diff options
| author | Miles Bader | 2000-10-27 01:22:21 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-27 01:22:21 +0000 |
| commit | a66d76d290e022285e7772b1286f45ddbc3ef23e (patch) | |
| tree | 27c7195782862a2c47d746abf1a8bed10bfcba3a | |
| parent | f28b75a9b9290ebdd74135f633c878f26f4008e2 (diff) | |
| download | emacs-a66d76d290e022285e7772b1286f45ddbc3ef23e.tar.gz emacs-a66d76d290e022285e7772b1286f45ddbc3ef23e.zip | |
(x_draw_glyph_string): Add a workaround so that fonts that specify a
negative underline position can still use underlines.
| -rw-r--r-- | src/xterm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index 9e1cabe8c3c..3539d8123af 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4221,7 +4221,12 @@ x_draw_glyph_string (s) | |||
| 4221 | 4221 | ||
| 4222 | if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h)) | 4222 | if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h)) |
| 4223 | h = 1; | 4223 | h = 1; |
| 4224 | if (!XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &dy)) | 4224 | if (!XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &dy) |
| 4225 | /* If the font specifies a negative underline position, | ||
| 4226 | we'll get a huge positive number, because dy is | ||
| 4227 | unsigned. This comparison is a workaround that just | ||
| 4228 | ignores the font's underline position in that case. XXX */ | ||
| 4229 | || dy > s->height) | ||
| 4225 | dy = s->height - h; | 4230 | dy = s->height - h; |
| 4226 | 4231 | ||
| 4227 | if (s->face->underline_defaulted_p) | 4232 | if (s->face->underline_defaulted_p) |