diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/w32term.c b/src/w32term.c index 6a98fc721cd..81666f5bc47 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2433,27 +2433,7 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2433 | } | 2433 | } |
| 2434 | else | 2434 | else |
| 2435 | { | 2435 | { |
| 2436 | /* If we are drawing in the middle of a glyph row, | 2436 | struct font *font = font_for_underline_metrics (s); |
| 2437 | find the first glyph in the run of underlined | ||
| 2438 | glyphs preceding the beginning of glyph string S. | ||
| 2439 | This is because that glyph determines the | ||
| 2440 | underline position and thickness for the entire | ||
| 2441 | run of the underlined glyphs. */ | ||
| 2442 | struct glyph *g0 = s->row->glyphs[s->area], *g; | ||
| 2443 | |||
| 2444 | for (g = s->first_glyph - 1; g >= g0; g--) | ||
| 2445 | { | ||
| 2446 | struct face *prev_face = FACE_FROM_ID (s->f, g->face_id); | ||
| 2447 | if (!(prev_face && prev_face->underline_p)) | ||
| 2448 | break; | ||
| 2449 | } | ||
| 2450 | |||
| 2451 | /* Now use the font of the last glyph we saw that | ||
| 2452 | still has the underlined_p flag set. */ | ||
| 2453 | struct face *glyph_face = FACE_FROM_ID (s->f, g[1].face_id); | ||
| 2454 | struct font *font = glyph_face->font; | ||
| 2455 | if (font) | ||
| 2456 | font_prepare_for_face (s->f, glyph_face); | ||
| 2457 | 2437 | ||
| 2458 | /* Get the underline thickness. Default is 1 pixel. */ | 2438 | /* Get the underline thickness. Default is 1 pixel. */ |
| 2459 | if (font && font->underline_thickness > 0) | 2439 | if (font && font->underline_thickness > 0) |