Mercurial > emacs
changeset 90450:5c96354daf9e
(ftfont_pattern_entity): Fix typo.
(ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of
locale.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 14 Jun 2006 00:38:48 +0000 |
parents | 5956a1352bc4 |
children | 6ffc9b378367 |
files | src/ftfont.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);