diff options
| author | Kenichi Handa | 1999-01-30 02:37:14 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-01-30 02:37:14 +0000 |
| commit | d5749adb2961ed1443670e8adf791f58abb2d763 (patch) | |
| tree | 4fc088992f0b51ac685d10a3c7d4b8e60e57ecbf /src | |
| parent | 715a159be226dec8f65e86f50cd0780462debabd (diff) | |
| download | emacs-d5749adb2961ed1443670e8adf791f58abb2d763.tar.gz emacs-d5749adb2961ed1443670e8adf791f58abb2d763.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 8 insertions, 1 deletions
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) | |||
| 6786 | fontp->full_name = fontp->name; | 6786 | fontp->full_name = fontp->name; |
| 6787 | 6787 | ||
| 6788 | fontp->size = font->max_bounds.width; | 6788 | fontp->size = font->max_bounds.width; |
| 6789 | fontp->height = font->max_bounds.ascent + font->max_bounds.descent; | 6789 | fontp->height = FONT_HEIGHT (font); |
| 6790 | { | ||
| 6791 | /* For some font, ascent and descent in max_bounds field is | ||
| 6792 | larger than the above value. */ | ||
| 6793 | int max_height = font->max_bounds.ascent + font->max_bounds.descent; | ||
| 6794 | if (max_height > fontp->height) | ||
| 6795 | fontp->height > max_height; | ||
| 6796 | } | ||
| 6790 | 6797 | ||
| 6791 | if (NILP (font_names)) | 6798 | if (NILP (font_names)) |
| 6792 | { | 6799 | { |