From cd912ce0673f7626094add3951b1dcfae5cc10f5 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 14 Aug 2014 12:19:22 +0200 Subject: [PATCH] Fix mistake in function extraTryFontsForFamily Taiwan and mainland China were inverted in the extraTryFontsForFamily method. This patch fixes it and makes sure to match the rest of the Chinese LANGIDs. Task-number: QTBUG-33307 Change-Id: I45048ff5e9c00d20f8e922902701129e80ed459d Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 696dc06cee..f30dcbaa32 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1582,11 +1582,11 @@ QStringList QWindowsFontDatabase::extraTryFontsForFamily(const QString &family) if (!tryFonts) { LANGID lid = GetUserDefaultLangID(); switch (lid&0xff) { - case LANG_CHINESE: // Chinese (Taiwan) - if ( lid == 0x0804 ) // Taiwan - tryFonts = ch_TW_tryFonts; - else + case LANG_CHINESE: // Chinese + if ( lid == 0x0804 || lid == 0x1004) // China mainland and Singapore tryFonts = ch_CN_tryFonts; + else + tryFonts = ch_TW_tryFonts; // Taiwan, Hong Kong and Macau break; case LANG_JAPANESE: tryFonts = jp_tryFonts;