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

QPF2 fonts don't work if Qt is configured with FreeType or FontConfig

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15.2
    • GUI: Font handling
    • None
    • Linux/X11

      On Linux/X11 the FontConfig or the FreeType font databases are used by Qt.

      These font databases subclass QPlatformFontDatabase and override a few virtuals. Those overrides don't call the base class implementation.

      The problem here is that QPlatformFontDatabase itself is responsible for handling of QPF2 fonts. Without the calls from the derived classes, Qt won't load any QPF2 font (in QT_QPA_FONTDIR or similar) – as e.g. QPlatformFontDatabase::populateFontDatabase() is never called (only the subclass override is).

      I understand QPF2 have been removed from Qt 6, but

      • are they still meant to be working in Qt 5?
      • are they supposed still work together with FreeType (e.g. to also load TTF fonts) or other font databases?
      • If yes, how to load them?
      • If not, why isn't the QPF2 font engine (and related code in QPlatformFontDatabase) disabled if another font database is being used? It's just dead weight for QtGui.

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

            esabraha Eskil Abrahamsen Blomfeldt
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes