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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes