Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-33307

mistake in function extraTryFontsForFamily

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.2
    • 5.0.0
    • GUI: Font handling
    • None
    • cd912ce0673f7626094add3951b1dcfae5cc10f5

    Description

      \Qt5.1.0\qtbase\src\plugins\platforms\windows\qwindowsfontdatabase.cpp
      
      static QStringList extraTryFontsForFamily(const QString& family)
      {
          QStringList result;
          QFontDatabase db;
          if (!db.writingSystems(family).contains(QFontDatabase::Symbol)) {
              if (!tryFonts) {
                  LANGID lid = GetUserDefaultLangID();
                  switch (lid&0xff) {
                  case LANG_CHINESE: // Chinese (Taiwan)
                      if ( lid == 0x0804 ) // Taiwan
                          tryFonts = ch_TW_tryFonts; // !!!!!should be ch_CN_tryFonts
                      else
                          tryFonts = ch_CN_tryFonts; // !!!!!should be ch_TW_tryFonts
                      break;
                  case LANG_JAPANESE:
                      tryFonts = jp_tryFonts;
                      break;
                  case LANG_KOREAN:
                      tryFonts = kr_tryFonts;
                      break;
                  default:
                      tryFonts = other_tryFonts;
                      break;
                  }
              }
              QStringList fm = QFontDatabase().families();
              const char **tf = tryFonts;
              while (tf && *tf) {
                  if (fm.contains(QLatin1String(*tf)))
                      result << QLatin1String(*tf);
                  ++tf;
              }
          }
          return result;
      }
      

      Attachments

        For Gerrit Dashboard: QTBUG-33307
        # Subject Branch Project Status CR V

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            garlicgreens Zhuangping Xie
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes