usp10: Display the blank glyph for some control characters (non truetype/opentype).

This commit is contained in:
Akihiro Sagawa 2015-08-12 00:54:40 +09:00 committed by Alexandre Julliard
parent 22e8046fcb
commit e083986df5
2 changed files with 10 additions and 5 deletions

View File

@ -1486,11 +1486,7 @@ static void test_ScriptShape(HDC hdc)
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);
if (i == 0)
ok(glyphs[0] == glyphs2[0] ||
broken(glyphs2[0] == blanks[j] && (blanks[j] < 0x10)),
"%s: [%02x] expected %04x, got %04x\n", lf.lfFaceName, blanks[j], glyphs[0], glyphs2[0]);
else todo_wine
ok(glyphs[0] == glyphs2[0] ||
broken(glyphs2[0] == blanks[j] && (blanks[j] < 0x10)),
"%s: [%02x] expected %04x, got %04x\n", lf.lfFaceName, blanks[j], glyphs[0], glyphs2[0]);

View File

@ -2967,6 +2967,15 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
/* No mirroring done here */
if (rtl) idx = cChars - 1 - i;
pwOutGlyphs[i] = pwcChars[idx];
/* overwrite some basic control glyphs to blank */
if (psa && psa->eScript == Script_Control &&
pwcChars[idx] < ((ScriptCache *)*psc)->tm.tmFirstChar)
{
if (pwcChars[idx] == 0x0009 || pwcChars[idx] == 0x000A ||
pwcChars[idx] == 0x000D || pwcChars[idx] >= 0x001C)
pwOutGlyphs[i] = ((ScriptCache *)*psc)->sfp.wgBlank;
}
}
}