Specifying QFont.families in QML?
-
QFont
hasfamilies
to provide with a set of fonts to choose from:
https://doc.qt.io/qt-5/qfont.html#setFamiliesThere is also the font style hint that would allow the font matching to prefer a certain type of fonts: https://doc.qt.io/qt-5/qfont.html#StyleHint-enum
I'm looking to provide font preferences for Windows and Mac, monospace fonts. What's the canonical way to provide a list of preferred fonts in QML?
Is there something like in CSS?
families
looked to be doing that.
But also a generic name, likemonospace
if all preferred are missing?The QML font docs didn't quite show me what I was hoping to find. But I've found that there's often more available to QML than what I manage to figure out from the docs.
https://doc.qt.io/qt-5/qml-font.html#details
Should allQFont
properties be available to QML?