Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.3, 6.3.0 Beta2, 6.4.0
-
None
-
Windows 10, MinGW Qt build
Description
Font selection via QFont::setStyleName() is broken on Windows.
QFontDatabase::styles("Arial") includes "Bold" as a valid style name. Yet, when requesting font family "Arial" with styleName "Bold", Qt renders "Arial" in the "Regular" style (= font weight 400).
Reproduction
import QtQuick import QtQuick.Window Window { width: 640 height: 480 visible: true title: qsTr("Font Style Selection Broken") Text { text: "Arial Bold" anchors.centerIn: parent font { pixelSize: 72 family: "Arial" styleName: "Bold" } } }
More extensive example with more debug output attached (QML and plain C++).
Attachments
Issue Links
- relates to
-
QTBUG-101610 Font "Alef" reports wrong style names and renders incorrectly
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-101436 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
399156,4 | Implement QFont selection via QFont::setStyleName() on Windows | dev | qt/qtbase | Status: NEW | -1 | 0 |
399157,4 | Add styleName to debug output | dev | qt/qtbase | Status: MERGED | +2 | 0 |
400266,2 | Add styleName to debug output | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |