diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 67a03898d13..2806f31155d 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2928,6 +2928,11 @@ ns_maybe_dumpglyphs_background (struct glyph_string *s, char force_p) | |||
| 2928 | { | 2928 | { |
| 2929 | int box_line_width = max (s->face->box_line_width, 0); | 2929 | int box_line_width = max (s->face->box_line_width, 0); |
| 2930 | if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width | 2930 | if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width |
| 2931 | /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font | ||
| 2932 | dimensions, since the actual glyphs might be much | ||
| 2933 | smaller. So in that case we always clear the rectangle | ||
| 2934 | with background color. */ | ||
| 2935 | || FONT_TOO_HIGH (s->font) | ||
| 2931 | || s->font_not_found_p || s->extends_to_end_of_line_p || force_p) | 2936 | || s->font_not_found_p || s->extends_to_end_of_line_p || force_p) |
| 2932 | { | 2937 | { |
| 2933 | struct face *face; | 2938 | struct face *face; |
| @@ -7687,6 +7692,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 7687 | { | 7692 | { |
| 7688 | struct font *font = XFONT_OBJECT (font_object); | 7693 | struct font *font = XFONT_OBJECT (font_object); |
| 7689 | EmacsView *view = FRAME_NS_VIEW (f); | 7694 | EmacsView *view = FRAME_NS_VIEW (f); |
| 7695 | int font_ascent, font_descent; | ||
| 7690 | 7696 | ||
| 7691 | if (fontset < 0) | 7697 | if (fontset < 0) |
| 7692 | fontset = fontset_from_font (font_object); | 7698 | fontset = fontset_from_font (font_object); |
| @@ -7701,7 +7707,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) | |||
| 7701 | 7707 | ||
| 7702 | FRAME_BASELINE_OFFSET (f) = font->baseline_offset; | 7708 | FRAME_BASELINE_OFFSET (f) = font->baseline_offset; |
| 7703 | FRAME_COLUMN_WIDTH (f) = font->average_width; | 7709 | FRAME_COLUMN_WIDTH (f) = font->average_width; |
| 7704 | FRAME_LINE_HEIGHT (f) = font->height; | 7710 | get_font_ascent_descent (font, &font_ascent, &font_descent); |
| 7711 | FRAME_LINE_HEIGHT (f) = font_ascent + font_descent; | ||
| 7705 | 7712 | ||
| 7706 | /* Compute the scroll bar width in character columns. */ | 7713 | /* Compute the scroll bar width in character columns. */ |
| 7707 | if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) | 7714 | if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) |