# HG changeset patch # User Kenichi Handa # Date 1150245528 0 # Node ID 5c96354daf9e0abc856a166471d449bc24850cb4 # Parent 5956a1352bc4d86dae26532de58a8f7a09a56efb (ftfont_pattern_entity): Fix typo. (ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of locale. diff -r 5956a1352bc4 -r 5c96354daf9e src/ftfont.c --- a/src/ftfont.c Fri Jun 09 07:23:27 2006 +0000 +++ b/src/ftfont.c Wed Jun 14 00:38:48 2006 +0000 @@ -96,7 +96,7 @@ if (FcPatternGetString (p, FC_FILE, 0, &file) != FcResultMatch) return Qnil; - if (FcPatternGetCharSet (p, FC_CHARSET, 0, &charset) == FcResultMatch) + if (FcPatternGetCharSet (p, FC_CHARSET, 0, &charset) != FcResultMatch) charset = NULL; entity = Fmake_vector (make_number (FONT_ENTITY_MAX), null_string); @@ -391,8 +391,13 @@ { FcPattern *pat; FcResult result; + FcValue v; Lisp_Object entity; + if (FcPatternGet (pattern, FC_LANG, 0, &v) == FcResultNoMatch) + /* If no language is specified in PATTERN, fontconfig will use + that of the current locale. This cancel that effect. */ + FcPatternAddString (pattern, FC_LANG, (FcChar8 *) "en"); FcConfigSubstitute (NULL, pattern, FcMatchPattern); FcDefaultSubstitute (pattern); pat = FcFontMatch (NULL, pattern, &result);