-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
6.8.3
-
None
The attached zip file nepomuk.zip contains a font family with six weights:
Regular
Bold
Italic
Bold Italic
SC
Bold SC
"SC" is the regular weight of the font, but small caps; "Bold SC" is the bold weight of the font, but small caps. Regular and SC both define the same weight class (Regular/400), width class (Normal), slope class (Plain); however, the style names are different ("Regular" vs "SC"). Similarly, for "Bold" and "Bold SC", they share the same weight class, width class, slope class, and have different style names.
QFontDatabase::styles on macOS only returns four entries: it omits "Regular" and "Bold". This means that the regular, non-small caps styles of the font are not available, and cannot be chosen in a Qt application.
The attached zip file style-lister-src.zip contains a trivial console application that can be used to reproduce the problem. Once it's built, provide the font family name ("Nepomuk") as an argument to the application, and it will list the QFontDatabase styles versus the Core Text styles.
My understanding is that internally QFontDatabase is merging fonts based on their common properties, and perhaps because it's encountering "SC" and "Bold SC" after "Regular" and "Bold", these styles end up replacing the wanted styles?
This seems to have worked OK in versions of Qt up to 6.8.1, but we've recently started using 6.8.3 and it appears the behaviour has changed.
- relates to
-
QTBUG-135315 Possible regression in handling of special style names
-
- Closed
-
-
QTBUG-135977 [REG 6.8.2 -> 6.8.3] WASM: Loaded Roboto Flex font rendered as italic by default
-
- Closed
-