[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/large-fonts 957cbfd: NS equivalents of xterm.c and
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] scratch/large-fonts 957cbfd: NS equivalents of xterm.c and w32term.c changes |
Date: |
Mon, 01 Jun 2015 14:47:32 +0000 |
branch: scratch/large-fonts
commit 957cbfd7650e6ebd1afc62daeb5f6923730112c9
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
NS equivalents of xterm.c and w32term.c changes
* src/nsterm.m (ns_maybe_dumpglyphs_background): Force redraw of
glyph string background also when the font in use claims
preposterously large global height value. Helps to remove
artifacts left from previous displays when glyphless characters
are displayed as hex code in a box.
(x_new_font): Call get_font_ascent_descent to obtain a reasonable
value for FRAME_LINE_HEIGHT, even when a font claims very large
value for its height.
---
src/nsterm.m | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 67a0389..2806f31 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2928,6 +2928,11 @@ ns_maybe_dumpglyphs_background (struct glyph_string *s,
char force_p)
{
int box_line_width = max (s->face->box_line_width, 0);
if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+ /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font
+ dimensions, since the actual glyphs might be much
+ smaller. So in that case we always clear the rectangle
+ with background color. */
+ || FONT_TOO_HIGH (s->font)
|| s->font_not_found_p || s->extends_to_end_of_line_p || force_p)
{
struct face *face;
@@ -7687,6 +7692,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int
fontset)
{
struct font *font = XFONT_OBJECT (font_object);
EmacsView *view = FRAME_NS_VIEW (f);
+ int font_ascent, font_descent;
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -7701,7 +7707,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int
fontset)
FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
FRAME_COLUMN_WIDTH (f) = font->average_width;
- FRAME_LINE_HEIGHT (f) = font->height;
+ get_font_ascent_descent (font, &font_ascent, &font_descent);
+ FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
/* Compute the scroll bar width in character columns. */
if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] scratch/large-fonts 957cbfd: NS equivalents of xterm.c and w32term.c changes,
Eli Zaretskii <=