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

Disappearing glyphs when application font reloaded

    XMLWordPrintable

Details

    Description

      We have a case where we load fonts via QFontDatabase::addApplicationFont and we also unload them once we have no consumers of this font anymore. Loading and unloading the fonts seems to cause issues with QtQuick text rendering. Sometimes characters disappear. I attached an example app that should show this issue. In addition to disappearing characters , we can observe crashes from the render thread when glyphs are being accessed from the TTF of a removed font.

      How To Use The Example

      Run the app and keep clicking the blue rectangle on the right. Every time it's clicked it will either load the font and display some random text or unload and remove the text. It also selects one of three custom fonts. After clicking it a couple of times missing characters should be noticeable.

      I also attached a screenshot of the missing text. In the metal shader debugger I could also see that the geometry for the missing characters is very small. The characters are also not included in the attached glyph texture.

      The text that was supposed to be displayed is: "j8LdwXrut0cPX7lbqOhY"

      One of the missing characters in the glyph texture is 'L' for example.

       

       

       

      Attachments

        1. GlyphTexture.png
          46 kB
          Marcel Gotsch
        2. qt6-minimal.zip
          3.52 MB
          Marcel Gotsch
        3. TextGeometry.png
          329 kB
          Marcel Gotsch
        For Gerrit Dashboard: QTBUG-100697
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            marcel.gotsch Marcel Gotsch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes