--- a/src/gui/text/qfontdatabase_win.cpp Tue Feb 02 00:43:10 2010 +0200
+++ b/src/gui/text/qfontdatabase_win.cpp Fri Apr 16 15:50:13 2010 +0300
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -336,8 +336,18 @@
signature->fsCsb[0], signature->fsCsb[1]
};
QList<QFontDatabase::WritingSystem> systems = determineWritingSystemsFromTrueTypeBits(unicodeRange, codePageRange);
- for (int i = 0; i < systems.count(); ++i)
- family->writingSystems[systems.at(i)] = QtFontFamily::Supported;
+
+ for (int i = 0; i < systems.count(); ++i) {
+ QFontDatabase::WritingSystem writingSystem = systems.at(i);
+
+ // ### Hack to work around problem with Thai text on Windows 7. Segoe UI contains
+ // the symbol for Baht, and Windows thus reports that it supports the Thai script.
+ // Since it's the default UI font on this platform, most widgets will be unable to
+ // display Thai text by default. As a temporary work around, we special case Segoe UI
+ // and remove the Thai script from its list of supported writing systems.
+ if (writingSystem != QFontDatabase::Thai || familyName != QLatin1String("Segoe UI"))
+ family->writingSystems[writingSystem] = QtFontFamily::Supported;
+ }
} else if (!family->writingSystemCheck) {
//qDebug("family='%s' script=%s", family->name.latin1(), script.latin1());
if (scriptName == QLatin1String("Western")