[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8046: [PATCH] Incorrect font selection in fontconfig driver
From: |
Chong Yidong |
Subject: |
bug#8046: [PATCH] Incorrect font selection in fontconfig driver |
Date: |
Sun, 07 Aug 2011 16:48:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Handa-san, could you evaluate this proposed change? Thanks.
Kostya Stopani <hatta@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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#8046: [PATCH] Incorrect font selection in fontconfig driver,
Chong Yidong <=