C

MCU.Config.autoGenerateGlyphs

This option controls automatic glyph generation.

Description

By default, this property is set to true to generate glyphs for all used characters in all the used font configurations. To reduce the memory footprint, set this property to false. In this case, fontcompiler will generate characters defined in font.unicodeCoverage only. For example:

readonly property font myFont1: Qt.font({ quality: Font.QualityVeryHigh })
readonly property font myFont2: Qt.font({ quality: Font.QualityVeryLow, unicodeCoverage: ["def"] })

Text {
    font: parent.myFont1
    text: "abc"
}
Text {
    font: parent.myFont2
    text: "def"
}

If autoGenerateGlyphs is set to false, then the "abc" characters in the earlier example are not rendered as the glyphs are not generated for that font configuration. The "def" characters are rendered as the font.unicodeCoverage property of myFont2 has the correct character set.

Note: autoGenerateGlyphs property does not affect StaticText element.

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.