dwrite: Fix underline/strikethrough position adjustment caused by text alignment.
authorNikolay Sivov <nsivov@codeweavers.com>
Sun, 24 Jan 2016 15:11:02 +0000 (18:11 +0300)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 25 Jan 2016 07:11:44 +0000 (16:11 +0900)
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/dwrite/layout.c

index 9842746ac873270c5eb4be4e5228cf8d4a6c57be..b6f4a65435942727332db9f64cca2a6190b0bf47 100644 (file)
@@ -3151,7 +3151,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
         IDWriteTextRenderer_DrawUnderline(renderer,
             context,
             /* horizontal underline always grows from left to right, width is always added to origin regardless of run direction */
-            (is_run_rtl(u->run) ? u->run->origin_x - u->run->width : u->run->origin_x) + run->align_dx + origin_x,
+            (is_run_rtl(u->run) ? u->run->origin_x - u->run->width : u->run->origin_x) + u->run->align_dx + origin_x,
             SNAP_COORD(u->run->origin_y + origin_y),
             &u->u,
             u->run->effect);
@@ -3161,7 +3161,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
     LIST_FOR_EACH_ENTRY(s, &This->strikethrough, struct layout_strikethrough, entry) {
         IDWriteTextRenderer_DrawStrikethrough(renderer,
             context,
-            s->run->origin_x + run->align_dx + origin_x,
+            s->run->origin_x + s->run->align_dx + origin_x,
             SNAP_COORD(s->run->origin_y + origin_y),
             &s->s,
             s->run->effect);