Commit 2ba00485 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: ScriptTextOut reorders glyphs that are RTL if they have been processed…

usp10: ScriptTextOut reorders glyphs that are RTL if they have been processed with fLogicalOrder in previous calls.
parent abae85b9
......@@ -1578,8 +1578,25 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
if (!psa->fNoGlyphIndex) /* Have Glyphs? */
fuOptions |= ETO_GLYPH_INDEX; /* Say don't do translation to glyph */
if (!ExtTextOutW(hdc, x, y, fuOptions, lprc, pwGlyphs, cGlyphs, NULL))
hr = S_FALSE;
if (psa->fRTL && psa->fLogicalOrder)
{
int i;
WORD *rtlGlyphs;
rtlGlyphs = heap_alloc(cGlyphs * sizeof(WORD));
if (!rtlGlyphs)
return E_OUTOFMEMORY;
for (i = 0; i < cGlyphs; i++)
rtlGlyphs[i] = pwGlyphs[cGlyphs-1-i];
if (!ExtTextOutW(hdc, x, y, fuOptions, lprc, rtlGlyphs, cGlyphs, NULL))
hr = S_FALSE;
heap_free(rtlGlyphs);
}
else
if (!ExtTextOutW(hdc, x, y, fuOptions, lprc, pwGlyphs, cGlyphs, NULL))
hr = S_FALSE;
return hr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment