Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt for MCUs 2.2.4, Qt fo MCUs 2.5.2
Description
One gets fontcompiler warning if the following conditions below are met:
1. CMake macro QUL_DEFAULT_FONT_FAMILY is set to some font
2. QUL_AUTO_GENERATE_GLYPHS is set to OFF (MCU.Config.autoGenerateGlyphs = false)
3. The property font implementing the default font family has pixelSize other than default (20).
An example of a warning:
[fontcompiler] warning: No glyphs were generated for font: [default font] Sarabun (size: 20, weight: 400, quality: 8). Make sure unicodeCoverage property was correctly set. See: https://doc.qt.io/QtForMCUs/qtul-fonts.html#embedding-glyphs
To avoid this warning one has to change pixelSize to 20 or alternatively make a "dummy" font property with default pixelSize. This should not be required.
Static font engine seems to always include glyphs for the default size, even if the application does not use it which is very wasteful. This can happen in the aforementioned case where the application does not use the default size, but explicitly sets font.pixelSize elsewhere.
If we would allow to set the default size via macro, the issue would go away.