diff options
| author | Kenichi Handa | 2006-06-14 00:38:48 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-06-14 00:38:48 +0000 |
| commit | f0365b6f1dfc4fae478d0be768526741d795dfd8 (patch) | |
| tree | 97bb18acbb76c266fb4c2c57c62f0d87ce8bda4e /src | |
| parent | ce4aada80544cb3e3f50c1203343d4e3efcb9cbc (diff) | |
| download | emacs-f0365b6f1dfc4fae478d0be768526741d795dfd8.tar.gz emacs-f0365b6f1dfc4fae478d0be768526741d795dfd8.zip | |
(ftfont_pattern_entity): Fix typo.
(ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of
locale.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftfont.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 5d70257beec..0decb5b4a2d 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -96,7 +96,7 @@ ftfont_pattern_entity (p, frame, registry, name) | |||
| 96 | 96 | ||
| 97 | if (FcPatternGetString (p, FC_FILE, 0, &file) != FcResultMatch) | 97 | if (FcPatternGetString (p, FC_FILE, 0, &file) != FcResultMatch) |
| 98 | return Qnil; | 98 | return Qnil; |
| 99 | if (FcPatternGetCharSet (p, FC_CHARSET, 0, &charset) == FcResultMatch) | 99 | if (FcPatternGetCharSet (p, FC_CHARSET, 0, &charset) != FcResultMatch) |
| 100 | charset = NULL; | 100 | charset = NULL; |
| 101 | 101 | ||
| 102 | entity = Fmake_vector (make_number (FONT_ENTITY_MAX), null_string); | 102 | entity = Fmake_vector (make_number (FONT_ENTITY_MAX), null_string); |
| @@ -391,8 +391,13 @@ ftfont_list (frame, spec) | |||
| 391 | { | 391 | { |
| 392 | FcPattern *pat; | 392 | FcPattern *pat; |
| 393 | FcResult result; | 393 | FcResult result; |
| 394 | FcValue v; | ||
| 394 | Lisp_Object entity; | 395 | Lisp_Object entity; |
| 395 | 396 | ||
| 397 | if (FcPatternGet (pattern, FC_LANG, 0, &v) == FcResultNoMatch) | ||
| 398 | /* If no language is specified in PATTERN, fontconfig will use | ||
| 399 | that of the current locale. This cancel that effect. */ | ||
| 400 | FcPatternAddString (pattern, FC_LANG, (FcChar8 *) "en"); | ||
| 396 | FcConfigSubstitute (NULL, pattern, FcMatchPattern); | 401 | FcConfigSubstitute (NULL, pattern, FcMatchPattern); |
| 397 | FcDefaultSubstitute (pattern); | 402 | FcDefaultSubstitute (pattern); |
| 398 | pat = FcFontMatch (NULL, pattern, &result); | 403 | pat = FcFontMatch (NULL, pattern, &result); |