aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorEli Zaretskii2015-05-28 20:23:41 +0300
committerEli Zaretskii2015-05-28 20:23:41 +0300
commitc76605faa1f597e67df1e5c6cfae5230ff3a6a76 (patch)
tree8d5100ba36931d2e06b9e61b34028d9620cdbcd0 /src/w32term.c
parent1d87cb3cfa08086be96f78ab09d99f3e7ba8ca60 (diff)
downloademacs-c76605faa1f597e67df1e5c6cfae5230ff3a6a76.tar.gz
emacs-c76605faa1f597e67df1e5c6cfae5230ff3a6a76.zip
Fix display of glyphless characters with problematic fonts
* src/w32term.c (x_draw_glyph_string_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. * src/xterm.c (x_draw_glyph_string_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. * src/w32font.c (w32font_draw): Fix background drawing for glyphless characters that display as acronyms or hex codes in a box. * src/xftfont.c (xftfont_draw): Fix background drawing for glyphless characters that display as acronyms or hex codes in a box. * src/xdisp.c (produce_glyphless_glyph): Compute reasonable values for it->ascent and it->descent when the font claims preposterously large global values. (FONT_TOO_HIGH): Move from here... * src/dispextern.h (FONT_TOO_HIGH): ...to here.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 0bc2e980214..9c4f28fa2d4 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1218,7 +1218,12 @@ x_draw_glyph_string_background (struct glyph_string *s, bool force_p)
1218 } 1218 }
1219 else 1219 else
1220#endif 1220#endif
1221 if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width 1221 if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
1222 /* When xdisp.c ignores FONT_HEIGHT, we cannot trust
1223 font dimensions, since the actual glyphs might be
1224 much smaller. So in that case we always clear the
1225 rectangle with background color. */
1226 || FONT_TOO_HIGH (s->font)
1222 || s->font_not_found_p 1227 || s->font_not_found_p
1223 || s->extends_to_end_of_line_p 1228 || s->extends_to_end_of_line_p
1224 || force_p) 1229 || force_p)