Module: wine Branch: master Commit: 22e8046fcb7663c24243da50a16cf5097cd392a4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=22e8046fcb7663c24243da50a1...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Wed Aug 12 00:54:39 2015 +0900
usp10: Display the blank glyph for some control characters (truetype/opentype).
---
dlls/usp10/shape.c | 5 ++++- dlls/usp10/tests/usp10.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index e942880..52c6a8b 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -950,7 +950,10 @@ static void ContextualShape_Control(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS * { switch (pwcChars[i]) { - case 0x000D: pwOutGlyphs[i] = psc->sfp.wgBlank; break; + case 0x000A: + case 0x000D: + pwOutGlyphs[i] = psc->sfp.wgBlank; + break; default: if (pwcChars[i] < 0x1C) pwOutGlyphs[i] = psc->sfp.wgDefault; diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 1702f20..7670dc2 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -1486,7 +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 && blanks[j] != '\n') + 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]);