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

Update QWindowsFontDatabaseBase::familyForStyleHint to modern font families

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.4
    • GUI: Font handling
    • Windows

      In qtbase\src\gui\text\windows\qwindowsfontdatabasebase.cpp we got:

      QString QWindowsFontDatabaseBase::familyForStyleHint(QFont::StyleHint styleHint)
      {
          switch (styleHint) {
          case QFont::Times:
              return QStringLiteral("Times New Roman");
          case QFont::Courier:
              return QStringLiteral("Courier New");
          case QFont::Monospace:
              return QStringLiteral("Courier New");
          case QFont::Cursive:
              return QStringLiteral("Comic Sans MS");
          case QFont::Fantasy:
              return QStringLiteral("Impact");
          case QFont::Decorative:
              return QStringLiteral("Old English");
          case QFont::Helvetica:
              return QStringLiteral("Arial");
          case QFont::System:
          default:
              break;
          }
          return QStringLiteral("MS Shell Dlg 2");
      }
      

      Which is very late 1990's.

      Qt 6 supports Windows nowadays starting with Windows 10, which points to the list of https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list 

      At Qt Creator we are displaying the markdown release notes and we render them using QTextBrowser.

      The sans serif font is picked as Segoe UI but the fixed font is Courier New and the result is not that great.

      I would expect the default font to be Segoe UI instead of MS Shell Dlg 2 and the fixed font as Consolas.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            wladimir.leuschner Wladimir Leuschner
            cadam Cristian Adam
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes