usp10: Don't modify psa->fNoGlyphIndex in ScriptShapeOpenType().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-06-10 00:44:36 +02:00 committed by Alexandre Julliard
parent acf2d54fb3
commit d73f2b02b0
2 changed files with 5 additions and 5 deletions

View file

@ -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)),

View file

@ -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;