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

Font features set on the application font copied over to other font families

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.7.0 Beta2
    • None
    • macOS

      I tested the new variable font support in 6.7.0 Beta 2, and while it works wonderfully (thank you, by the way), features set on a QFont instance in C++ code during startup seems to be set on unrelated fonts in QtQuick.

      When my application starts, I load fonts into QFontDatabase, get a QFont instance for my default preferred font, and set features on it:

      This works as expected, but then I load additional fonts for the application, the same way with QFontDatabase. I don't set any features on them. However, when looking at the UI, I can see that, for example, the "ss01" feature is applied to another font family. 

      The family I set the features on is called "InterVariable", these headers use the family "Torus":

      With no features set on InterVariable:

      With features set on InterVariable:

      This is a regular QtQuick label, with font.features not set on it. When I manually specify font.features: { "ss01": 0 }, the issue goes away. I would expect it to have that default value though.

      Just tested, getting a QFont instance from the supposed to be unaffected Torus font on the C++ side, and setting "ss01" to 0 does not affect the font in Quick, just like I would expect. Maybe only the application default font's features affect the others? If that is the case, I would still consider this as a bug, since setting features on a specific QFont object shouldn't affect unrelated QFont objects, even if the one I set the feature on is the application default.

        1. image-2024-02-02-23-50-50-252.png
          117 kB
          Lóránt Viktor Gerber
        2. image-2024-02-02-23-52-47-230.png
          16 kB
          Lóránt Viktor Gerber
        3. image-2024-02-02-23-53-03-866.png
          16 kB
          Lóránt Viktor Gerber
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            glorantv Lóránt Viktor Gerber
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes