usp10: ScriptTextOut reorders glyphs that are RTL if they have been processed with fLogicalOrder in previous calls.
This commit is contained in:
parent
abae85b976
commit
2ba0048541
|
@ -1578,8 +1578,25 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
|
||||||
if (!psa->fNoGlyphIndex) /* Have Glyphs? */
|
if (!psa->fNoGlyphIndex) /* Have Glyphs? */
|
||||||
fuOptions |= ETO_GLYPH_INDEX; /* Say don't do translation to glyph */
|
fuOptions |= ETO_GLYPH_INDEX; /* Say don't do translation to glyph */
|
||||||
|
|
||||||
if (!ExtTextOutW(hdc, x, y, fuOptions, lprc, pwGlyphs, cGlyphs, NULL))
|
if (psa->fRTL && psa->fLogicalOrder)
|
||||||
hr = S_FALSE;
|
{
|
||||||
|
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;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue