usp10: Don't replace control characters with blanks when psa->fNoGlyphIndex is set.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d73f2b02b0
commit
68830f12e7
|
@ -1733,6 +1733,16 @@ static void test_ScriptShape(HDC hdc)
|
||||||
"%s: [%02x] expected %04x, got %04x\n", lf.lfFaceName, blanks[j], glyphs[0], glyphs2[0]);
|
"%s: [%02x] expected %04x, got %04x\n", lf.lfFaceName, blanks[j], glyphs[0], glyphs2[0]);
|
||||||
ok(attrs[0].fZeroWidth || broken(!attrs[0].fZeroWidth && (blanks[j] < 0x10) /* Vista */),
|
ok(attrs[0].fZeroWidth || broken(!attrs[0].fZeroWidth && (blanks[j] < 0x10) /* Vista */),
|
||||||
"%s: [%02x] got unexpected fZeroWidth %#x.\n", lf.lfFaceName, blanks[j], attrs[0].fZeroWidth);
|
"%s: [%02x] got unexpected fZeroWidth %#x.\n", lf.lfFaceName, blanks[j], attrs[0].fZeroWidth);
|
||||||
|
|
||||||
|
items[0].a.fNoGlyphIndex = 1;
|
||||||
|
hr = ScriptShape(hdc, &sc, &blanks[j], 1, 1, &items[0].a, glyphs2, logclust, attrs, &nb);
|
||||||
|
ok(hr == S_OK, "%s: [%02x] expected S_OK, got %08x\n", lf.lfFaceName, blanks[j], hr);
|
||||||
|
ok(nb == 1, "%s: [%02x] expected 1, got %d\n", lf.lfFaceName, blanks[j], nb);
|
||||||
|
|
||||||
|
ok(glyphs2[0] == blanks[j],
|
||||||
|
"%s: [%02x] got unexpected %04x.\n", lf.lfFaceName, blanks[j], glyphs2[0]);
|
||||||
|
ok(!attrs[0].fZeroWidth, "%s: [%02x] got unexpected fZeroWidth %#x.\n",
|
||||||
|
lf.lfFaceName, blanks[j], attrs[0].fZeroWidth);
|
||||||
}
|
}
|
||||||
if (oldfont)
|
if (oldfont)
|
||||||
DeleteObject(SelectObject(hdc, oldfont));
|
DeleteObject(SelectObject(hdc, oldfont));
|
||||||
|
|
|
@ -3177,7 +3177,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
|
||||||
pwOutGlyphs[i] = pwcChars[idx];
|
pwOutGlyphs[i] = pwcChars[idx];
|
||||||
|
|
||||||
/* overwrite some basic control glyphs to blank */
|
/* overwrite some basic control glyphs to blank */
|
||||||
if (psa && psa->eScript == Script_Control &&
|
if (psa && !psa->fNoGlyphIndex && psa->eScript == Script_Control &&
|
||||||
pwcChars[idx] < ((ScriptCache *)*psc)->tm.tmFirstChar)
|
pwcChars[idx] < ((ScriptCache *)*psc)->tm.tmFirstChar)
|
||||||
{
|
{
|
||||||
if (pwcChars[idx] == 0x0009 || pwcChars[idx] == 0x000A ||
|
if (pwcChars[idx] == 0x0009 || pwcChars[idx] == 0x000A ||
|
||||||
|
|
Loading…
Reference in New Issue