I have a Qt 4.8 app with it's front end UI all done via QML in a QDeclarativeView.
On the (original) Linux version of the app, there are a couple of fonts it uses in QML in Text items via specifying
font.family: "ReykjavikOne OT AGauge"
or
font.family: "ReykjavikOne OT CGauge"
and these work as expected (the CGauge one is a sort of fat, bold version).
However, on the Mac port, both these seem to fall back to some ugly default fallback sans font. But using
font.family: "ReykjavikOne OT"
does get the "AGauge".
On the Linux system, fc-list | grep ReykjavikOne
gets me
/usr/share/fonts/opentype/ReykjavikOneCGaugeItalic.otf: ReykjavikOne OT,ReykjavikOne OT CGaugeItalic:style=CGaugeItalic
/usr/share/fonts/opentype/ReykjavikOneCGauge.otf: ReykjavikOne OT,ReykjavikOne OT CGauge:style=CGauge
/usr/share/fonts/opentype/ReykjavikOneAGauge.otf: ReykjavikOne OT,ReykjavikOne OT AGauge:style=AGauge
/usr/share/fonts/opentype/ReykjavikOneAGaugeItalic.otf: ReykjavikOne OT,ReykjavikOne OT AGaugeItalic:style=AGaugeItalic
and on the Mac, FontBook shows the 4 styles listed as sub items under a single "ReykjavikOne OT" entry. The CGauge font seems to be perfectly usable in other apps on the Mac, so I'm assuming this is an issue peculiar to Qt/QML.
There just doesn't seem to be any QML Text/font mechanism (at least, not one I can discover) by which I can select a font style with style name "CGauge". Messing around with bold/font-weight just seems to get me a bolder AGauge, or the default font.
Much the same applies to QML RichText content too. Text with <style></style>
elements containing font-family: 'ReykjavikOne OT CGauge'
work fine on Linux, but on Mac it reverts to the fallback font and 'ReykjavikOne OT'
is the best can be done, obtaining the AGauge. (Adding a font-weight: bold;
does get a bold AGauge, but CGauge is noticeably fatter).
Both Mac and Linux (Debian/Wheezy) systems have the fonts installed from the same .otf files.
What's my best hope to work round this issue and get the CGauge style of the font to display on the Mac as intended? (NB I'm a novice when it comes to fonts, and Macs).