Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5.3
-
None
-
-
1c39eddbd (dev), e3e5462fb (6.6), 67cbfe5a4 (tqtc/lts-6.5)
-
DaVinci 90, DaVinci 91
Description
The documentation of qml font weights says that the value is between 0 and 99 and has values for the individual enum items, like 57 for Font.Medium.
In reality though, the enumeration follows the definition in QFont with 500 for Font.Medium, for example. Exhaustive list:
import QtQuick Window { id: win width: 800 height: 600 visible: true title: 'weight' Component.onCompleted: () => { console.log('Font.Thin ', Font.Thin) console.log('Font.ExtraLight', Font.ExtraLight) console.log('Font.Light ', Font.Light) console.log('Font.Normal ', Font.Normal) console.log('Font.Medium ', Font.Medium) console.log('Font.DemiBold ', Font.DemiBold) console.log('Font.Bold ', Font.Bold) console.log('Font.ExtraBold ', Font.ExtraBold) console.log('Font.Black ', Font.Black) } }
results in
qml: Font.Thin 100 qml: Font.ExtraLight 200 qml: Font.Light 300 qml: Font.Normal 400 qml: Font.Medium 500 qml: Font.DemiBold 600 qml: Font.Bold 700 qml: Font.ExtraBold 800 qml: Font.Black 900