Commit a66d76d2 authored by Miles Bader's avatar Miles Bader
Browse files

(x_draw_glyph_string): Add a workaround so that fonts that specify a

  negative underline position can still use underlines.
parent f28b75a9
......@@ -4221,7 +4221,12 @@ x_draw_glyph_string (s)
if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h))
h = 1;
if (!XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &dy))
if (!XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &dy)
/* If the font specifies a negative underline position,
we'll get a huge positive number, because dy is
unsigned. This comparison is a workaround that just
ignores the font's underline position in that case. XXX */
|| dy > s->height)
dy = s->height - h;
if (s->face->underline_defaulted_p)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment