C
MCU.Config.autoGenerateGlyphs
This option controls automatic glyph generation for the static font engine. It does not affect StaticText items or dynamic text. For dynamic text, the application developer must define the required character coverage explicitly. StaticText items handle glyph selection automatically, regardless of the MCU.Config.autoGenerateGlyphs configuration.
Description
By default, this property is set to true to generate glyphs for all characters used by the application across all used font configurations. This is convenient during development because it typically "just works" without manual coverage tuning.
For deployment, it is recommended to set this property to false when you want to fine-tune font coverage and minimize ROM usage. In this case, fontcompiler generates glyphs only for the characters defined in font.unicodeCoverage.
Predefined set in auto-generate mode
When MCU.Config.autoGenerateGlyphs is enabled, the font compiler automatically injects a small predefined character set in addition to the glyphs collected from the application. This improves robustness for common UI patterns (numbers, signs, scientific notation, and ellipsis) without requiring explicit configuration.
The predefined character set always includes digits, common numeric symbols, and U+2026 HORIZONTAL ELLIPSIS.
const QString predefinedCharacterSet =
QString("0123456789-+.e") + QChar(0x2026);Soft hyphen and hyphen candidates in auto-generate mode
Soft hyphen support is available since Qt Quick Ultralite 3.0.
In auto-generate mode, the font compiler ensures that a hyphen glyph is available for soft hyphen presentation. Rather than relying on a single codepoint, the compiler consults a predefined list of hyphen candidates and adds the first one that exists in the selected font.
The lookup is typography-first: the dedicated hyphen (U+2010) is preferred over the ASCII hyphen-minus (U+002D). The soft hyphen codepoint (U+00AD) is used only as a last resort, as many fonts map it to a placeholder or otherwise undesirable glyph.
Manual mode
When MCU.Config.autoGenerateGlyphs is false, no additional glyphs are added implicitly. If your application relies on soft hyphen behavior, you must explicitly include an appropriate hyphen codepoint in your configured character set.
You may choose any of the candidates listed in the previous section. At runtime, the font engine uses the same candidate order when selecting which hyphen glyph to use: the first available candidate in the font is selected.
Usage
This property is accepted in the main application .qmlproject file. It takes a boolean value, and the default value is true.
Code example
MCU.Config {
autoGenerateGlyphs: false
}Since
This property was introduced in QmlProject API 1.3.
See also font.unicodeCoverage and static font engine.
Available under certain Qt licenses.
Find out more.