Commit e083986d authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

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

parent 22e8046f
......@@ -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]);
......
......@@ -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;
}
}
}
......
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