Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.5.0 Beta
-
None
-
Arch Linux, Qt latest 5.5 branch, configured with system freetype lib and fontconfig
Description
See screenshot: simple QML rendering of all 9 possible font weights, using the Alright Sans family of 6 OTF fonts, with Text.NativeRendering. (but it's the same with distance field rendering) Fonts are in this case being installed via QFontDatabase::addApplicationFont() rather than installed as system fonts.
Also enabled some qdebugs in qfontdatabase.cpp and got this info about how it is choosing:
[ 0.542 D] main - available font styles: ("Black", "Bold", "Medium", "Regular", "Thin", "Ultra") [ 0.613 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 25, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.613 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.613 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.613 D] bestStyle - best style has distance 0x0 [ 0.614 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.614 D] bestFoundry - found a match: score 0 best score so far ffffffff [ 0.625 D] QFreetypeFace::getFace - filename "../alrightsans-regular-v3.otf" [ 0.625 D] QFontEngineFT::init - "Alright Sans" weight 25 style_flags 0 pixelSize 17 embolden? false [ 0.733 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 87, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.733 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.733 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.733 D] bestStyle - best style has distance 0x0 [ 0.733 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.733 D] bestFoundry - found a match: score 0 best score so far ffffffff [ 0.736 D] QFreetypeFace::getFace - filename "../alrightsans-ultra-v3.otf" [ 0.737 D] QFontEngineFT::init - "Alright Sans" weight 87 style_flags 2 pixelSize 17 embolden? false [ 0.737 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 81, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.737 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.737 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.737 D] bestStyle - best style has distance 0x6 [ 0.738 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.738 D] bestFoundry - found a match: score 2000 best score so far ffffffff [ 0.741 D] QFreetypeFace::getFace - filename "../alrightsans-bold-v3.otf" [ 0.742 D] QFontEngineFT::init - "Alright Sans" weight 81 style_flags 2 pixelSize 17 embolden? false [ 0.742 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 75, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.743 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.743 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.743 D] bestStyle - best style has distance 0x0 [ 0.743 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.743 D] bestFoundry - found a match: score 0 best score so far ffffffff [ 0.746 D] QFreetypeFace::getFace - filename "../alrightsans-bold-v3.otf" [ 0.746 D] QFontEngineFT::init - "Alright Sans" weight 75 style_flags 2 pixelSize 17 embolden? false [ 0.747 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 63, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.747 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.747 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.747 D] bestStyle - best style has distance 0xc [ 0.747 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.747 D] bestFoundry - found a match: score 2000 best score so far ffffffff [ 0.751 D] QFreetypeFace::getFace - filename "../alrightsans-bold-v3.otf" [ 0.751 D] QFontEngineFT::init - "Alright Sans" weight 63 style_flags 2 pixelSize 17 embolden? false [ 0.752 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 57, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.752 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.752 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.752 D] bestStyle - best style has distance 0x7 [ 0.752 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.752 D] bestFoundry - found a match: score 2000 best score so far ffffffff [ 0.756 D] QFreetypeFace::getFace - filename "../alrightsans-black-v3.otf" [ 0.756 D] QFontEngineFT::init - "Alright Sans" weight 57 style_flags 0 pixelSize 17 embolden? false [ 0.757 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 50, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.757 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.757 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.757 D] bestStyle - best style has distance 0x0 [ 0.757 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.758 D] bestFoundry - found a match: score 0 best score so far ffffffff [ 0.762 D] QFreetypeFace::getFace - filename "../alrightsans-black-v3.otf" [ 0.762 D] QFontEngineFT::init - "Alright Sans" weight 50 style_flags 0 pixelSize 17 embolden? false [ 0.762 D] match - QFontDatabase::match request: family: Alright Sans [-- any --], script: 2 weight: 12, style: 0 stretch: 100 pixelSize: 17 pitch: * [ 0.762 D] bestFoundry - REMARK: looking for best foundry for family 'Alright Sans' [1] [ 0.762 D] bestFoundry - looking for matching style in foundry 'unknown' 6 [ 0.762 D] bestStyle - best style has distance 0xd [ 0.763 D] bestFoundry - found smoothly scalable font (17 pixels) [ 0.763 D] bestFoundry - found a match: score 2000 best score so far ffffffff [ 0.766 D] QFreetypeFace::getFace - filename "../alrightsans-regular-v3.otf" [ 0.767 D] QFontEngineFT::init - "Alright Sans" weight 12 style_flags 0 pixelSize 17 embolden? false
Attachments
Issue Links
- is required for
-
QTBUG-74860 Umbrella task for font selection issues
- In Progress
- relates to
-
QTBUG-30851 Impossible to use different flavours of a font in the same project without changing the font's "Font Family"
- Closed
-
QTBUG-70220 Windows and macOS do not map font weight correctly for Montserrat variants
- Reported
-
QTBUG-46042 QFontEngineFT artificially emboldens fonts that are bold but don't have the Style Map set to Bold
- Reported
-
QTBUG-75641 Qml font weight and styleName not working (not rendered correctly)
- Closed