GNU bug report logs - #8046
[PATCH] Incorrect font selection in fontconfig driver

Previous Next

Package: emacs;

Reported by: Kostya Stopani <hatta <at> depni.sinp.msu.ru>

Date: Tue, 15 Feb 2011 18:32:01 UTC

Severity: normal

Tags: patch

Merged with 10193

Fixed in version 24.0.93

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Kenichi Handa <handa <at> m17n.org>
Cc: 8046 <at> debbugs.gnu.org, Kostya Stopani <hatta <at> depni.sinp.msu.ru>
Subject: bug#8046: [PATCH] Incorrect font selection in fontconfig driver
Date: Sun, 07 Aug 2011 16:48:18 -0400
Handa-san, could you evaluate this proposed change?  Thanks.


Kostya Stopani <hatta <at> depni.sinp.msu.ru> writes:

> Attached file in koi8-r encoding displays incorrectly on Linux with
> default DejaVu (from fontset-startup) and some other fonts (on
> emacs-24.0.50.12). Cyrillic characters are rendered in oblique style
> instead of normal.
>
> The reason is that ftfont_list function filters out fonts when its
> langname parameter doesn't match font's adstyle property. But adstyle
> really most of the time has neutral values like "Book" or
> "Semicondensed". As far as I know it can contain language codes only
> for PCF japanese and korean fonts (respectively "ja" and "ko"). A
> patch to fix this behaviour is below.
>
> * src/ftfont.c (ftfont_list): reject fonts using langname only if
> adstyle is "ja" or "ko".
>
>
> === modified file 'src/ftfont.c'
> *** src/ftfont.c	2011-02-05 22:30:14 +0000
> --- src/ftfont.c	2011-02-15 18:13:28 +0000
> *************** ftfont_list (Lisp_Object frame, Lisp_Obj
> *** 1026,1031 ****
> --- 1026,1032 ----
>   				  SSDATA (SYMBOL_NAME (this_adstyle))) != 0))
>   	    continue;
>   	  if (langname
> + 	      && (xstrcasecmp (langname, "ja") == 0 || xstrcasecmp (langname, "ko") == 0)
>   	      && ! NILP (this_adstyle)
>   	      && xstrcasecmp (langname, SSDATA (SYMBOL_NAME (this_adstyle))))
>   	    continue;




This bug report was last modified 13 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.