src/gui/text/qfontdatabase_win.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
equal deleted inserted replaced
6:dee5afe5301f 8:3f74d0d4af4c
   334 #endif
   334 #endif
   335             quint32 codePageRange[2] = {
   335             quint32 codePageRange[2] = {
   336                 signature->fsCsb[0], signature->fsCsb[1]
   336                 signature->fsCsb[0], signature->fsCsb[1]
   337             };
   337             };
   338             QList<QFontDatabase::WritingSystem> systems = determineWritingSystemsFromTrueTypeBits(unicodeRange, codePageRange);
   338             QList<QFontDatabase::WritingSystem> systems = determineWritingSystemsFromTrueTypeBits(unicodeRange, codePageRange);
   339             for (int i = 0; i < systems.count(); ++i)
   339 
   340                 family->writingSystems[systems.at(i)] = QtFontFamily::Supported;
   340             for (int i = 0; i < systems.count(); ++i) {
       
   341                 QFontDatabase::WritingSystem writingSystem = systems.at(i);
       
   342 
       
   343                 // ### Hack to work around problem with Thai text on Windows 7. Segoe UI contains
       
   344                 // the symbol for Baht, and Windows thus reports that it supports the Thai script.
       
   345                 // Since it's the default UI font on this platform, most widgets will be unable to
       
   346                 // display Thai text by default. As a temporary work around, we special case Segoe UI
       
   347                 // and remove the Thai script from its list of supported writing systems.
       
   348                 if (writingSystem != QFontDatabase::Thai || familyName != QLatin1String("Segoe UI"))
       
   349                     family->writingSystems[writingSystem] = QtFontFamily::Supported;
       
   350             }
   341         } else if (!family->writingSystemCheck) {
   351         } else if (!family->writingSystemCheck) {
   342             //qDebug("family='%s' script=%s", family->name.latin1(), script.latin1());
   352             //qDebug("family='%s' script=%s", family->name.latin1(), script.latin1());
   343             if (scriptName == QLatin1String("Western")
   353             if (scriptName == QLatin1String("Western")
   344                 || scriptName == QLatin1String("Baltic")
   354                 || scriptName == QLatin1String("Baltic")
   345                 || scriptName == QLatin1String("Central European")
   355                 || scriptName == QLatin1String("Central European")