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

FreeType font backend fails to load variable font variations

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.3, 6.4.0
    • GUI: Font handling
    • None
    • macOS 12.2

    • macOS

    Description

      The macOS FreeType backend fails to load font face variations of variable fonts (e.g. Regular, Light, Medium, etc.).

      Example font: the variable version of the font "Inter" (https://fonts.google.com/specimen/Inter). It always renders as "Regular".

      Reproduction (run with argument -platform cocoa:fontengine=freetype):

      #include <QGuiApplication>
      #include <QFont>
      #include <QFontInfo>
      #include <QDebug>
      
      
      int main(int argc, char *argv[])
      {
          QGuiApplication app(argc, argv);
      
          QFont font("Inter");
          font.setStyleName("Light");
          font.setPixelSize(12);
      
          QFontInfo info(font);
          qDebug() << info.family() << info.styleName();
      }
      

      Actual output:

      "Inter" "Regular"
      

      Expected output:

      "Inter" "Light"
      

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              nikwen Niklas Wenzel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change