Mercurial > emacs
comparison src/xfaces.c @ 52200:b154b2a09262
* 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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 15 Aug 2003 12:08:51 +0000 |
parents | c1f65dfc56eb |
children | 0941be5b523e |
comparison
equal
deleted
inserted
replaced
52199:7ae60c4fe488 | 52200:b154b2a09262 |
---|---|
6043 return 0; | 6043 return 0; |
6044 else if (delta1 < delta2) | 6044 else if (delta1 < delta2) |
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 |
6051 | 6063 |
6052 /* Value is non-zero if FONT is an exact match for face attributes in | 6064 /* Value is non-zero if FONT is an exact match for face attributes in |
6275 { | 6287 { |
6276 if (best == NULL | 6288 if (best == NULL |
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) |
6284 { | 6299 { |
6285 enum xlfd_weight want_weight = specified[XLFD_WEIGHT]; | 6300 enum xlfd_weight want_weight = specified[XLFD_WEIGHT]; |