My application allows the user to switch languages ββon the fly. I see that in about 10% of cases the user switches to Chinese or Japanese, the glyphs for the user interface text are not processed properly.
This application is running Linux on the iMX6 platform. Qt 5.5.0 is used. QML is used to visualize the user interface. Corrupt text is processed using a QML text control.
An example of processing damaged fonts
The font used is Source Hans Sans Regular. I tried loading this using QML FontLoader and loading it on the C ++ side into the font database of the application (both methods identified a problem). I tried using (admittedly very strongly related) Noto fonts; same problem.
I have never seen a text rendering distortion when using Roboto for text other than CJK, and as already mentioned, this works more often than not for CJK / Source Hans Sans.
Corruption is interesting in that it is similar to the level of the displayed bitmap, and not to the level of definition of the glyph (note that some glyphs have a lower half of correctness, but the upper half is damaged).
Corruption sometimes progresses. This makes me think that the cache of glyph glyph maps is rewritten further (just a theory, since I'm not sure how Qt renders fonts). I thought it might be a QML garbage collection doing something strange, but loading the font on the C ++ side did not help.
I will try to use "native rendering" for the following QML text controls.
Has anyone seen this before? Can anyone confirm that FreeType is used for font management / rendering in Qt 5.5.0? Are there ways to influence the management of this bitmap cache?
Thanks!
Update : using 'renderType: Text.NativeRendering' did not fix the problem (although corruption appeared a little differently). And, given the limitations of this mode, I just finished with the usually poorly displayed text (soft, poor scaling, etc. - as documented ).
Update 2 : I built Qt with (to my knowledge) all glyph caches disabled - shouldDrawCachedGlyphs () returns false in my local assembly for four instances of this call, I was able to find, but still encounters glyph corruption.
Update 3 : I tried switching to using Qt Quick 2 software (not OpenGL) by setting QMLSCENE_DEVICE = softwarecontext on each document ; Glyph damage did happen.