I have a QML app that's using a font family that has 5 weights—Light/Regular/Medium/Bold/Black—and 3 styles: Normal, Italic, and Condensed.
When I load both a 'normal' and 'condensed' style of the same weight they share the same family name; whichever style was loaded first is what is used:
FontLoader { source:"qrc:/fonts/DINPro-CondRegular.otf"; id:cond }
FontLoader { source:"qrc:/fonts/DINPro-Regular.otf"; id:norm }
Timer { running:true; onTriggered:console.log(id:norm.name==cond.name) } // outputs `true`
// This ends up using the condensed flavor
Text { text:'hi mom'; font { family:'DINPro' } }
Is there some way to tell a Text
object to use a specific font file or FontLoader
instance? There's an italic
property for italic style, but no property for the 'condensed' flavor.
How can I use both normal and condensed styles of the font in the same document, and specify which to use for different Text
?