Henri Verbeet : usp10: Don' t replace control characters with blanks when psa->fNoGlyphIndex is set.
Alexandre Julliard
julliard at winehq.org
Mon Jun 13 11:11:31 CDT 2016
Module: wine
Branch: master
Commit: 68830f12e7b792ca7f5eeecd02488372d54c04a3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=68830f12e7b792ca7f5eeecd02488372d54c04a3
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Jun 10 00:44:37 2016 +0200
usp10: Don't replace control characters with blanks when psa->fNoGlyphIndex is set.
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 | 10 ++++++++++
dlls/usp10/usp10.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 2f5ae9e..0014b1c 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -1733,6 +1733,16 @@ static void test_ScriptShape(HDC hdc)
"%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);
+
+ items[0].a.fNoGlyphIndex = 1;
+ hr = ScriptShape(hdc, &sc, &blanks[j], 1, 1, &items[0].a, glyphs2, logclust, attrs, &nb);
+ ok(hr == S_OK, "%s: [%02x] expected S_OK, got %08x\n", lf.lfFaceName, blanks[j], hr);
+ ok(nb == 1, "%s: [%02x] expected 1, got %d\n", lf.lfFaceName, blanks[j], nb);
+
+ ok(glyphs2[0] == blanks[j],
+ "%s: [%02x] got unexpected %04x.\n", lf.lfFaceName, blanks[j], glyphs2[0]);
+ ok(!attrs[0].fZeroWidth, "%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 aaa0824..07c2175 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3177,7 +3177,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
pwOutGlyphs[i] = pwcChars[idx];
/* overwrite some basic control glyphs to blank */
- if (psa && psa->eScript == Script_Control &&
+ if (psa && !psa->fNoGlyphIndex && psa->eScript == Script_Control &&
pwcChars[idx] < ((ScriptCache *)*psc)->tm.tmFirstChar)
{
if (pwcChars[idx] == 0x0009 || pwcChars[idx] == 0x000A ||
More information about the wine-cvs
mailing list