Commit d185fc2f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Michael Stefaniuc

usp10: Use single path for all fonts in ScriptGetCMap().

Testing tmPitchAndFamily bitmask does not tell if font has mappings defined. Besides that, GetGlyphIndices() handles bitmap system fonts exactly the same way alternate path did. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46678Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org> (cherry picked from commit df4aaff7) Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org>
parent 502db409
......@@ -3544,42 +3544,27 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars
hr = S_OK;
if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE))
for (i = 0; i < cChars; i++)
{
for (i = 0; i < cChars; i++)
WCHAR inChar;
if (dwFlags == SGCM_RTL)
inChar = mirror_char(pwcInChars[i]);
else
inChar = pwcInChars[i];
if (!(pwOutGlyphs[i] = get_cache_glyph(psc, inChar)))
{
WCHAR inChar;
if (dwFlags == SGCM_RTL)
inChar = mirror_char(pwcInChars[i]);
else
inChar = pwcInChars[i];
if (!(pwOutGlyphs[i] = get_cache_glyph(psc, inChar)))
WORD glyph;
if (!hdc) return E_PENDING;
if (GetGlyphIndicesW(hdc, &inChar, 1, &glyph, GGI_MARK_NONEXISTING_GLYPHS) == GDI_ERROR) return S_FALSE;
if (glyph == 0xffff)
{
WORD glyph;
if (!hdc) return E_PENDING;
if (GetGlyphIndicesW(hdc, &inChar, 1, &glyph, GGI_MARK_NONEXISTING_GLYPHS) == GDI_ERROR) return S_FALSE;
if (glyph == 0xffff)
{
hr = S_FALSE;
glyph = 0x0;
}
pwOutGlyphs[i] = set_cache_glyph(psc, inChar, glyph);
hr = S_FALSE;
glyph = 0x0;
}
pwOutGlyphs[i] = set_cache_glyph(psc, inChar, glyph);
}
}
else
{
TRACE("no glyph translation\n");
for (i = 0; i < cChars; i++)
{
WCHAR inChar;
if (dwFlags == SGCM_RTL)
inChar = mirror_char(pwcInChars[i]);
else
inChar = pwcInChars[i];
pwOutGlyphs[i] = inChar;
}
}
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