usp10: ScriptPlace should honour the fZeroWidth attribute.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cdda92fc4e
commit
fc028e99c1
|
@ -1747,6 +1747,19 @@ static void test_ScriptPlace(HDC hdc)
|
|||
ok(hr == S_OK, "ScriptPlace should return S_OK not %08x\n", hr);
|
||||
ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n");
|
||||
|
||||
if (widths[0] != 0)
|
||||
{
|
||||
int old_width = widths[0];
|
||||
attrs[0].fZeroWidth = 1;
|
||||
|
||||
hr = ScriptPlace(hdc, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL);
|
||||
ok(hr == S_OK, "ScriptPlace should return S_OK not %08x\n", hr);
|
||||
ok(widths[0] == 0, "got width %d\n", widths[0]);
|
||||
widths[0] = old_width;
|
||||
}
|
||||
else
|
||||
skip("Glyph already has zero-width - skipping fZeroWidth test\n");
|
||||
|
||||
ret = ExtTextOutW(hdc, 1, 1, 0, NULL, glyphs, 4, widths);
|
||||
ok(ret, "ExtTextOutW should return TRUE\n");
|
||||
|
||||
|
|
|
@ -3316,7 +3316,11 @@ HRESULT WINAPI ScriptPlaceOpenType( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS
|
|||
for (i = 0; i < cGlyphs; i++)
|
||||
{
|
||||
ABC abc;
|
||||
if (!get_cache_glyph_widths(psc, pwGlyphs[i], &abc))
|
||||
if (pGlyphProps[i].sva.fZeroWidth)
|
||||
{
|
||||
abc.abcA = abc.abcB = abc.abcC = 0;
|
||||
}
|
||||
else if (!get_cache_glyph_widths(psc, pwGlyphs[i], &abc))
|
||||
{
|
||||
if (!hdc) return E_PENDING;
|
||||
if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
|
||||
|
|
Loading…
Reference in New Issue