aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 57e64c48887..28faea14a3a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3636,27 +3636,7 @@ x_draw_glyph_string (struct glyph_string *s)
3636 } 3636 }
3637 else 3637 else
3638 { 3638 {
3639 /* If we are drawing in the middle of a glyph row, 3639 struct font *font = font_for_underline_metrics (s);
3640 find the first glyph in the run of underlined
3641 glyphs preceding the beginning of glyph string S.
3642 This is because that glyph determines the
3643 underline position and thickness for the entire
3644 run of the underlined glyphs. */
3645 struct glyph *g0 = s->row->glyphs[s->area], *g;
3646
3647 for (g = s->first_glyph - 1; g >= g0; g--)
3648 {
3649 struct face *prev_face = FACE_FROM_ID (s->f, g->face_id);
3650 if (!(prev_face && prev_face->underline_p))
3651 break;
3652 }
3653
3654 /* Now use the font of the last glyph we saw that
3655 still has the underlined_p flag set. */
3656 struct face *glyph_face = FACE_FROM_ID (s->f, g[1].face_id);
3657 struct font *font = glyph_face->font;
3658 if (font)
3659 font_prepare_for_face (s->f, glyph_face);
3660 3640
3661 /* Get the underline thickness. Default is 1 pixel. */ 3641 /* Get the underline thickness. Default is 1 pixel. */
3662 if (font && font->underline_thickness > 0) 3642 if (font && font->underline_thickness > 0)