[PATCH 2/5] usp10: Don't modify psa->fNoGlyphIndex in ScriptShapeOpenType().
Aric Stewart
aric at codeweavers.com
Mon Jun 13 10:43:05 CDT 2016
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 6/9/16 5:44 PM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
> 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-patches
mailing list