[Interest] FontLoader - Multiple variations of the same font family

Nuno Santos nunosantos at imaginando.pt
Mon Jan 8 11:51:18 CET 2018


Hi,

I’m trying to use multiple FontLoader instances to load multiple variations of the same font family since we can only specify a file on the font loader source.

FontLoader {
    id: mainFont
    source: "qrc:/fonts/OpenSans-Regular.ttf"
}

FontLoader {
    id: mainFontLight
    source: "qrc:/fonts/OpenSans-Light.ttf"
}

However, when using mainFontLight as font, the font appears as mainFont.

Is there any way of loading multiple variations of the same font using Qt? 

Thanks!

Regards,

Nuno


More information about the Interest mailing list