diff options
| author | Kenichi Handa | 2009-04-13 12:33:02 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-04-13 12:33:02 +0000 |
| commit | 7395a3b3278acf50a66294d2f799a9e62b146b2d (patch) | |
| tree | d16729e8d3e77d728b5310453a12634c7566903f /src | |
| parent | 5b36b5337fab5b1d5cc35830713b4fc3c5552204 (diff) | |
| download | emacs-7395a3b3278acf50a66294d2f799a9e62b146b2d.tar.gz emacs-7395a3b3278acf50a66294d2f799a9e62b146b2d.zip | |
(font_delete_unmatched): Preserve the order of list
elements.
(font_select_entity): Suppress the code to optimize for the same
kind of fonts.
(font_load_for_lface): Get a font that supports at least ASCII
characters.
Diffstat (limited to 'src')
| -rw-r--r-- | src/font.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/font.c b/src/font.c index bb83fe938a0..58518727bd6 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -2752,7 +2752,7 @@ font_delete_unmatched (list, spec, size) | |||
| 2752 | if (prop < FONT_SPEC_MAX) | 2752 | if (prop < FONT_SPEC_MAX) |
| 2753 | val = Fcons (entity, val); | 2753 | val = Fcons (entity, val); |
| 2754 | } | 2754 | } |
| 2755 | return val; | 2755 | return Fnreverse (val); |
| 2756 | } | 2756 | } |
| 2757 | 2757 | ||
| 2758 | 2758 | ||
| @@ -3223,6 +3223,11 @@ font_select_entity (frame, entities, attrs, pixel_size, c) | |||
| 3223 | int j; | 3223 | int j; |
| 3224 | 3224 | ||
| 3225 | font_entity = AREF (entities, i); | 3225 | font_entity = AREF (entities, i); |
| 3226 | #if 0 | ||
| 3227 | /* The following code is intended to avoid checking of | ||
| 3228 | font_has_char repeatedly for bitmap fonts that differs only | ||
| 3229 | in pixelsize. But, it doesn't work well if fontconfig is | ||
| 3230 | configured to find BDF/PFC fonts. */ | ||
| 3226 | if (i > 0) | 3231 | if (i > 0) |
| 3227 | { | 3232 | { |
| 3228 | for (j = FONT_FOUNDRY_INDEX; j <= FONT_REGISTRY_INDEX; j++) | 3233 | for (j = FONT_FOUNDRY_INDEX; j <= FONT_REGISTRY_INDEX; j++) |
| @@ -3233,6 +3238,7 @@ font_select_entity (frame, entities, attrs, pixel_size, c) | |||
| 3233 | } | 3238 | } |
| 3234 | for (j = FONT_FOUNDRY_INDEX; j <= FONT_REGISTRY_INDEX; j++) | 3239 | for (j = FONT_FOUNDRY_INDEX; j <= FONT_REGISTRY_INDEX; j++) |
| 3235 | props[j] = AREF (font_entity, j); | 3240 | props[j] = AREF (font_entity, j); |
| 3241 | #endif | ||
| 3236 | result = font_has_char (f, font_entity, c); | 3242 | result = font_has_char (f, font_entity, c); |
| 3237 | if (result > 0) | 3243 | if (result > 0) |
| 3238 | return font_entity; | 3244 | return font_entity; |
| @@ -3455,7 +3461,8 @@ font_load_for_lface (f, attrs, spec) | |||
| 3455 | { | 3461 | { |
| 3456 | Lisp_Object entity; | 3462 | Lisp_Object entity; |
| 3457 | 3463 | ||
| 3458 | entity = font_find_for_lface (f, attrs, spec, -1); | 3464 | /* We assume that a font that supports 'A' supports ASCII chars. */ |
| 3465 | entity = font_find_for_lface (f, attrs, spec, 'A'); | ||
| 3459 | if (NILP (entity)) | 3466 | if (NILP (entity)) |
| 3460 | { | 3467 | { |
| 3461 | /* No font is listed for SPEC, but each font-backend may have | 3468 | /* No font is listed for SPEC, but each font-backend may have |