Henri Verbeet : usp10: Don't modify psa-> fNoGlyphIndex in ScriptShapeOpenType().
Alexandre Julliard
julliard at winehq.org
Mon Jun 13 11:11:30 CDT 2016
Module: wine
Branch: master
Commit: d73f2b02b014776bb61685a3c88f78f2f3add4eb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d73f2b02b014776bb61685a3c88f78f2f3add4eb
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Jun 10 00:44:36 2016 +0200
usp10: Don't modify psa->fNoGlyphIndex in ScriptShapeOpenType().
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 | 4 ++++
dlls/usp10/usp10.c | 6 +-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 0e1bd07..2f5ae9e 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -1720,9 +1720,13 @@ static void test_ScriptShape(HDC hdc)
hr = ScriptItemize(&blanks[j], 1, 2, NULL, NULL, items, NULL);
ok(hr == S_OK, "%s: [%02x] expected S_OK, got %08x\n", lf.lfFaceName, blanks[j], hr);
+ ok(!items[0].a.fNoGlyphIndex, "%s: [%02x] got unexpected fNoGlyphIndex %#x.\n",
+ lf.lfFaceName, blanks[j], items[0].a.fNoGlyphIndex);
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(!items[0].a.fNoGlyphIndex, "%s: [%02x] got unexpected fNoGlyphIndex %#x.\n",
+ lf.lfFaceName, blanks[j], items[0].a.fNoGlyphIndex);
ok(glyphs[0] == glyphs2[0] ||
broken(glyphs2[0] == blanks[j] && (blanks[j] < 0x10)),
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 52f93ab..aaa0824 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3081,10 +3081,6 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
((ScriptCache *)*psc)->userScript = tagScript;
((ScriptCache *)*psc)->userLang = tagLangSys;
- /* set fNoGlyphIndex non truetype/opentype fonts */
- if (psa && !psa->fNoGlyphIndex && !((ScriptCache *)*psc)->sfnt)
- psa->fNoGlyphIndex = TRUE;
-
/* Initialize a SCRIPT_VISATTR and LogClust for each char in this run */
for (i = 0; i < cChars; i++)
{
@@ -3104,7 +3100,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
pwLogClust[i] = idx;
}
- if (psa && !psa->fNoGlyphIndex)
+ if (psa && !psa->fNoGlyphIndex && ((ScriptCache *)*psc)->sfnt)
{
WCHAR *rChars;
if ((hr = SHAPE_CheckFontForRequiredFeatures(hdc, (ScriptCache *)*psc, psa)) != S_OK) return hr;
More information about the wine-cvs
mailing list