mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-01 18:48:29 +00:00
gdi32/uniscribe: Ensure the cache is initialised.
Call init_script_cache() in ScriptTextOut() to ensure that a cache exists for the logic around the ETO_GLYPH_INDEX flag.
This commit is contained in:
parent
5e4a5b0be2
commit
09a6d0f291
|
@ -3510,7 +3510,7 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
|
||||||
int iReserved, const WORD *pwGlyphs, int cGlyphs, const int *piAdvance,
|
int iReserved, const WORD *pwGlyphs, int cGlyphs, const int *piAdvance,
|
||||||
const int *piJustify, const GOFFSET *pGoffset)
|
const int *piJustify, const GOFFSET *pGoffset)
|
||||||
{
|
{
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr;
|
||||||
INT i, dir = 1;
|
INT i, dir = 1;
|
||||||
INT *lpDx;
|
INT *lpDx;
|
||||||
WORD *reordered_glyphs = (WORD *)pwGlyphs;
|
WORD *reordered_glyphs = (WORD *)pwGlyphs;
|
||||||
|
@ -3521,6 +3521,7 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
|
||||||
|
|
||||||
if (!hdc || !psc) return E_INVALIDARG;
|
if (!hdc || !psc) return E_INVALIDARG;
|
||||||
if (!piAdvance || !psa || !pwGlyphs) return E_INVALIDARG;
|
if (!piAdvance || !psa || !pwGlyphs) return E_INVALIDARG;
|
||||||
|
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
|
||||||
|
|
||||||
fuOptions &= ETO_CLIPPED | ETO_OPAQUE;
|
fuOptions &= ETO_CLIPPED | ETO_OPAQUE;
|
||||||
fuOptions |= ETO_IGNORELANGUAGE;
|
fuOptions |= ETO_IGNORELANGUAGE;
|
||||||
|
|
|
@ -2777,6 +2777,7 @@ static void test_ScriptTextOut(HDC hdc)
|
||||||
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0,
|
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0,
|
||||||
pwOutGlyphs1, pcGlyphs, piAdvance, NULL, pGoffset);
|
pwOutGlyphs1, pcGlyphs, piAdvance, NULL, pGoffset);
|
||||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||||
|
ok(!!psc, "Got unexpected psc %p.\n", psc);
|
||||||
|
|
||||||
/* Test Rect Rgn is acceptable. */
|
/* Test Rect Rgn is acceptable. */
|
||||||
SetRect(&rect, 10, 10, 40, 20);
|
SetRect(&rect, 10, 10, 40, 20);
|
||||||
|
|
Loading…
Reference in a new issue