diff options
| author | Kenichi Handa | 2003-08-15 12:08:51 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-08-15 12:08:51 +0000 |
| commit | 10b7e56f147cae42bdb5dce74e3eef8185dfe0f1 (patch) | |
| tree | 2fd8f63e1f01fe92e8cead62262a2debccf83ce9 /src | |
| parent | 5aad5947b812b204f119edf044cafd68bdcb1e71 (diff) | |
| download | emacs-10b7e56f147cae42bdb5dce74e3eef8185dfe0f1.tar.gz emacs-10b7e56f147cae42bdb5dce74e3eef8185dfe0f1.zip | |
* xfaces.c (better_font_p): Prefer a real scalable font; i.e. not
what autoscaled.
(best_matching_font): Once we find a better scalable font, set
non_scalable_has_exact_height_p to 1.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index e296c52a2b8..229797fc1ad 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -6045,6 +6045,18 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth) | |||
| 6045 | return 1; | 6045 | return 1; |
| 6046 | } | 6046 | } |
| 6047 | 6047 | ||
| 6048 | if (! compare_pt_p) | ||
| 6049 | { | ||
| 6050 | /* We prefer a real scalable font; i.e. not what autoscaled. */ | ||
| 6051 | int auto_scaled_1 = (font1->numeric[XLFD_POINT_SIZE] == 0 | ||
| 6052 | && font1->numeric[XLFD_RESY] > 0); | ||
| 6053 | int auto_scaled_2 = (font2->numeric[XLFD_POINT_SIZE] == 0 | ||
| 6054 | && font2->numeric[XLFD_RESY] > 0); | ||
| 6055 | |||
| 6056 | if (auto_scaled_1 != auto_scaled_2) | ||
| 6057 | return auto_scaled_2; | ||
| 6058 | } | ||
| 6059 | |||
| 6048 | return font1->registry_priority < font2->registry_priority; | 6060 | return font1->registry_priority < font2->registry_priority; |
| 6049 | } | 6061 | } |
| 6050 | 6062 | ||
| @@ -6277,7 +6289,10 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike) | |||
| 6277 | || better_font_p (specified, fonts + i, best, 0, 0) | 6289 | || better_font_p (specified, fonts + i, best, 0, 0) |
| 6278 | || (!non_scalable_has_exact_height_p | 6290 | || (!non_scalable_has_exact_height_p |
| 6279 | && !better_font_p (specified, best, fonts + i, 0, 0))) | 6291 | && !better_font_p (specified, best, fonts + i, 0, 0))) |
| 6280 | best = fonts + i; | 6292 | { |
| 6293 | non_scalable_has_exact_height_p = 1; | ||
| 6294 | best = fonts + i; | ||
| 6295 | } | ||
| 6281 | } | 6296 | } |
| 6282 | 6297 | ||
| 6283 | if (needs_overstrike) | 6298 | if (needs_overstrike) |