comparison src/w32term.c @ 103509:9c0aa5262fc9

* w32term.c (x_draw_glyph_string): Use the glyph string's width rather than its background_width for drawing the overline and underline (Bug#489). * xterm.c (x_draw_glyph_string): Use the glyph string's width rather than its background_width for drawing the overline and underline (Bug#489).
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 22 Jun 2009 02:01:56 +0000
parents b1792516bf99
children 48d529d3a5a4
comparison
equal deleted inserted replaced
103508:b3c1a923f213 103509:9c0aa5262fc9
2399 s->underline_position =position; 2399 s->underline_position =position;
2400 y = s->ybase + position; 2400 y = s->ybase + position;
2401 if (s->face->underline_defaulted_p) 2401 if (s->face->underline_defaulted_p)
2402 { 2402 {
2403 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, 2403 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
2404 y, s->background_width, 1); 2404 y, s->width, 1);
2405 } 2405 }
2406 else 2406 else
2407 { 2407 {
2408 w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x, 2408 w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
2409 y, s->background_width, 1); 2409 y, s->width, 1);
2410 } 2410 }
2411 } 2411 }
2412 /* Draw overline. */ 2412 /* Draw overline. */
2413 if (s->face->overline_p) 2413 if (s->face->overline_p)
2414 { 2414 {
2415 unsigned long dy = 0, h = 1; 2415 unsigned long dy = 0, h = 1;
2416 2416
2417 if (s->face->overline_color_defaulted_p) 2417 if (s->face->overline_color_defaulted_p)
2418 { 2418 {
2419 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, 2419 w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
2420 s->y + dy, s->background_width, h); 2420 s->y + dy, s->width, h);
2421 } 2421 }
2422 else 2422 else
2423 { 2423 {
2424 w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x, 2424 w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
2425 s->y + dy, s->background_width, h); 2425 s->y + dy, s->width, h);
2426 } 2426 }
2427 } 2427 }
2428 2428
2429 /* Draw strike-through. */ 2429 /* Draw strike-through. */
2430 if (s->face->strike_through_p 2430 if (s->face->strike_through_p