Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
5.4.0 Beta
Description
Get the Open Sans fonts from Google: http://www.fontsquirrel.com/fonts/open-sans
Then run the following example:
import QtQuick 2.4 import QtQuick.Controls 1.2 ApplicationWindow { id: window width: 400 height: 400 visible: true property FontLoader __openSansRegularLoader: FontLoader { source: "OpenSans-Regular.ttf" } property FontLoader __openSansLightLoader: FontLoader { source: "OpenSans-Light.ttf" } property FontLoader __openSansDemiBoldLoader: FontLoader { source: "OpenSans-Semibold.ttf" } property int renderType: Text.NativeRendering Row { Text { text: "Blah" font.family: "Open Sans" font.pixelSize: 48 renderType: window.renderType } Text { text: "Blah" font.family: "Open Sans" font.pixelSize: 48 font.weight: Font.Light renderType: window.renderType } Text { text: "Blah" font.family: "Open Sans" font.pixelSize: 48 font.weight: Font.DemiBold renderType: window.renderType } } }
The Light font works fine, but the Regular font is replaced by the DemiBold version instead. If you change the order of the FontLoader objects so that the Regular font is loaded last, it works fine.