Huw Davies : usp10: Fix MarkToBase offset for RTL text.

Alexandre Julliard julliard at winehq.org
Mon Jan 14 15:55:50 CST 2013


Module: wine
Branch: master
Commit: 7ba38ad62e1d92f4b3db74ea2077add20547c07e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7ba38ad62e1d92f4b3db74ea2077add20547c07e

Author: Huw Davies <huw at codeweavers.com>
Date:   Mon Jan 14 13:17:17 2013 +0000

usp10: Fix MarkToBase offset for RTL text.

---

 dlls/usp10/opentype.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c
index 1938892..f8cf8a1 100644
--- a/dlls/usp10/opentype.c
+++ b/dlls/usp10/opentype.c
@@ -1730,7 +1730,9 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c
             if (desU.x || desU.y)
             {
                 GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY);
-                pGoffset[glyph_index].du += (round(devX) - piAdvance[glyph_index-1]);
+                if (!analysis->fRTL) pGoffset[glyph_index].du -= piAdvance[glyph_index-1];
+                else if (analysis->fLogicalOrder) devX *= -1;
+                pGoffset[glyph_index].du += round(devX);
                 pGoffset[glyph_index].dv += round(devY);
             }
             break;




More information about the wine-cvs mailing list