# HG changeset patch # User Miles Bader # Date 972609741 0 # Node ID 4b9c0e6751e7133c8208e5280e782937289af0a1 # Parent dc58e218a878ee6c653db5ae5b85c0f35278e82a (x_draw_glyph_string): Add a workaround so that fonts that specify a negative underline position can still use underlines. diff -r dc58e218a878 -r 4b9c0e6751e7 src/xterm.c --- a/src/xterm.c Fri Oct 27 01:16:47 2000 +0000 +++ b/src/xterm.c Fri Oct 27 01:22:21 2000 +0000 @@ -4221,7 +4221,12 @@ 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)