Akihiro Sagawa : gdi32/tests: Skip linked font like SimSun-ExtB in fixed-pitch font selection.
Alexandre Julliard
julliard at winehq.org
Wed Oct 9 14:22:13 CDT 2013
Module: wine
Branch: master
Commit: 0b58ab7ac9f1e6d94a198bdb9cf055ee9472bb00
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0b58ab7ac9f1e6d94a198bdb9cf055ee9472bb00
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Wed Oct 9 00:12:17 2013 +0900
gdi32/tests: Skip linked font like SimSun-ExtB in fixed-pitch font selection.
---
dlls/gdi32/tests/font.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 2343db6..574ebaf 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -4009,6 +4009,7 @@ static int CALLBACK create_fixed_pitch_font_proc(const LOGFONT *lpelfe,
CHARSETINFO csi;
LOGFONT lf = *lpelfe;
HFONT hfont;
+ DWORD found_subset;
/* skip bitmap, proportional or vertical font */
if ((FontType & TRUETYPE_FONTTYPE) == 0 ||
@@ -4021,6 +4022,25 @@ static int CALLBACK create_fixed_pitch_font_proc(const LOGFONT *lpelfe,
(lpntmex->ntmFontSig.fsCsb[0] & csi.fs.fsCsb[0]) == 0)
return 1;
+ /* skip linked font, like SimSun-ExtB */
+ switch (lpelfe->lfCharSet) {
+ case SHIFTJIS_CHARSET:
+ found_subset = lpntmex->ntmFontSig.fsUsb[1] & (1 << 17); /* Hiragana */
+ break;
+ case GB2312_CHARSET:
+ case CHINESEBIG5_CHARSET:
+ found_subset = lpntmex->ntmFontSig.fsUsb[1] & (1 << 16); /* CJK Symbols And Punctuation */
+ break;
+ case HANGEUL_CHARSET:
+ found_subset = lpntmex->ntmFontSig.fsUsb[1] & (1 << 24); /* Hangul Syllables */
+ break;
+ default:
+ found_subset = lpntmex->ntmFontSig.fsUsb[0] & (1 << 0); /* Basic Latin */
+ break;
+ }
+ if (!found_subset)
+ return 1;
+
/* test with an odd height */
lf.lfHeight = -19;
lf.lfWidth = 0;
More information about the wine-cvs
mailing list