From 22e8046fcb7663c24243da50a16cf5097cd392a4 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Wed, 12 Aug 2015 00:54:39 +0900 Subject: [PATCH] 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 e9428808620..52c6a8bd75a 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 1702f20fcbe..7670dc2a3ec 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]);