From d5749adb2961ed1443670e8adf791f58abb2d763 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 30 Jan 1999 02:37:14 +0000 Subject: [PATCH] (x_load_font): For the height of font, if normarl ascent and descent value are larger than those in max_bounds field, use the former. --- src/xterm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 361a0d1159e..2af69ca92a4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6786,7 +6786,14 @@ x_load_font (f, fontname, size) fontp->full_name = fontp->name; fontp->size = font->max_bounds.width; - fontp->height = font->max_bounds.ascent + font->max_bounds.descent; + fontp->height = FONT_HEIGHT (font); + { + /* For some font, ascent and descent in max_bounds field is + larger than the above value. */ + int max_height = font->max_bounds.ascent + font->max_bounds.descent; + if (max_height > fontp->height) + fontp->height > max_height; + } if (NILP (font_names)) { -- 2.39.2