From 086764f5f4d0a50a87edfa1cff18b26edf36c94a Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Fri, 15 Jul 2011 16:03:06 +0000 Subject: [PATCH] When doing manual underlining, underline the text in question rather than a box to the right of it. Probably introduced sometime around r9063. [originally from svn r9217] [r9063 == 00b32eda3cc76187e18ef1332e6f7b56fe460f9e] --- windows/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/window.c b/windows/window.c index 908c1f68..da0d3d48 100644 --- a/windows/window.c +++ b/windows/window.c @@ -3594,8 +3594,8 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, dec = dec * 2 - font_height; oldpen = SelectObject(hdc, CreatePen(PS_SOLID, 0, fg)); - MoveToEx(hdc, x, y + dec, NULL); - LineTo(hdc, x + len * char_width, y + dec); + MoveToEx(hdc, line_box.left, line_box.top + dec, NULL); + LineTo(hdc, line_box.right, line_box.top + dec); oldpen = SelectObject(hdc, oldpen); DeleteObject(oldpen); }