aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c17
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)