Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.2.2
-
None
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.