Henri Verbeet : usp10: Set fZeroWidth when replacing control characters with blanks.

Alexandre Julliard julliard at winehq.org
Mon Jun 13 11:11:30 CDT 2016


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Jun 10 00:44:35 2016 +0200

usp10: Set fZeroWidth when replacing control characters with blanks.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/usp10/tests/usp10.c | 2 ++
 dlls/usp10/usp10.c       | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 0a0ac2d..0e1bd07 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -1727,6 +1727,8 @@ static void test_ScriptShape(HDC hdc)
             ok(glyphs[0] == glyphs2[0] ||
                broken(glyphs2[0] == blanks[j] && (blanks[j] < 0x10)),
                "%s: [%02x] expected %04x, got %04x\n", lf.lfFaceName, blanks[j], glyphs[0], glyphs2[0]);
+            ok(attrs[0].fZeroWidth || broken(!attrs[0].fZeroWidth && (blanks[j] < 0x10) /* Vista */),
+               "%s: [%02x] got unexpected fZeroWidth %#x.\n", lf.lfFaceName, blanks[j], attrs[0].fZeroWidth);
         }
         if (oldfont)
             DeleteObject(SelectObject(hdc, oldfont));
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 74250ea..52f93ab 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3186,7 +3186,10 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
             {
                 if (pwcChars[idx] == 0x0009 || pwcChars[idx] == 0x000A ||
                     pwcChars[idx] == 0x000D || pwcChars[idx] >= 0x001C)
+                {
                     pwOutGlyphs[i] = ((ScriptCache *)*psc)->sfp.wgBlank;
+                    pOutGlyphProps[i].sva.fZeroWidth = 1;
+                }
             }
         }
     }




More information about the wine-cvs mailing list