GNU bug report logs -
#8046
[PATCH] Incorrect font selection in fontconfig driver
Previous Next
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
[Message part 1 (text/plain, inline)]
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. Here's a part of M-x font-show-log showing this:
default fontset: font for: 1057
ftfont-list: -unknown-DejaVu Sans Mono-*-k-koi8-r
-unknown-DejaVu Sans Mono-bold-oblique-normal-*-m-0-isoso6060646-1
-unknown-DejaVu Sans Mono-normal-oblique-normal-*-m-0-iso10646-1
-unknown-DejaVu Sans Mono-bold-normal-normal-*-0soso101064646-1
xfont-list: -unknown-DejaVu Sans Mono-*-*-*-*-*-*-*-*-*-*-koi8-r
list: -unknown-DejaVu Sans Mono-*-k-koi8-r
-unknown-DejaVu Sans Mono-bold-oblique-normal-*-m-0-isoso6060646-1
-unknown-DejaVu Sans Mono-normal-oblique-normal-*-m-0-iso10646-1
-unknown-DejaVu Sans Mono-bold-normal-normal-*-0soso101064646-1
sort-by: -*-normal-normal-normal-*-13-*
xft:-unknown-DejaVu Sans Mono-normal-oblique-normal-*-m-0-iso10646-1
open: -unknown-DejaVu Sans Mono-normal-oblique-normal-*-m-0-iso10646-1
xft:-unknown-DejaVu Sans Mono-normal-oblique-normal-*-13-*-m-0-iso10646-1
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;
[1.txt (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
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.