Akihiro Sagawa : usp10: Display the blank glyph for some control characters (non truetype/ opentype).
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 12 09:17:55 CDT 2015
Module: wine
Branch: master
Commit: e083986df52bd706d0c7e8ae8820a5d886942585
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e083986df52bd706d0c7e8ae8820a5d886942585
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Wed Aug 12 00:54:40 2015 +0900
usp10: Display the blank glyph for some control characters (non truetype/opentype).
---
dlls/usp10/tests/usp10.c | 6 +-----
dlls/usp10/usp10.c | 9 +++++++++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 7670dc2..f9b43d1 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -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]);
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 628f45c..fa4dc79 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -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;
+ }
}
}
More information about the wine-cvs
mailing list