I'm having difficulty with QtQuick font support. I can't quite be sure where 
the issue is, but it appears that Qt does not support ttf fonts with styles / 
SubFamilies, or it may be an issue with font weights.

In particular if you go to any old font on Google fonts and download it.  Say 
"Raleway" you'll get many 'subfamilies' of the font "ExtraBold" "ExtraLight" 
"Thin" etc.  However, QML will only render Bold and Normal.  Even if I only 
give it access to a single file like "Raleway-Thin.ttf”

This post suggests that this might be by design if it's a font family naming 
issue: 
http://stackoverflow.com/questions/17521578/qml-font-style-naming-issue-mac-linux-platform-differences

However these font files draw properly in every other application I’ve tried.

Ttf fonts from google fonts and other sources, and in general css font 
specifications define font weights in the hundreds with 400 being 'normal' 
however QML uses internal constants Font.Light, Font.Bold etc, that are in a 
range of 0-99 and doesn't seem to allow any numbers other than the small set of 
defined constants.  So it may not be name, but  that I can't define the weight 
properly "Railway Thin" is defined at weight 100.

Ttf fonts from google fonts and other sources, and in general css font 
specifications define font weights in the hundreds with 400 being 'normal' 
however QML uses internal constants Font.Light, Font.Bold etc, that are in a 
range of 0-99 and doesn't seem to allow any numbers other than the small set of 
defined constants.  So it may not be name, but that I can't define the weight 
properly "Railway Thin" is defined at weight 100.

I've done extensive tests with the Text object, and font properties, including 
using a file dialogue, and setting the font from the system fonts procedurally. 
QtQuick consistently renders the font at the incorrect weight.

Any insights would be appreciated.  If it is an intentional design choice then 
I’ll bring it up in the developer list, but I wanted to make sure it isn’t user 
error first.

Thanks,
j
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to