diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 0e1bd0761a3..2f5ae9e53a1 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 52f93ab2ca3..aaa082470b7 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;