Hi,

Yes, this is normal, in a way. OS X has this notion of private fonts, which 
basically correspond to the system fonts. We make it possible to be used inside 
Qt, and set it as the default font but, because of its nature, we keep it 
hidden from the end-user. The same happens with a native font picker on OS X. 
That is, this font is not visible to the end-user. The only exception is within 
Xcode, where it is simply called "System font".

If you can share your motivation for exposing such font, we will see what's 
possible to improve.

Best regards,

Dr. Gabriel de Dietrich
Senior Software Developer
The Qt Company — www.qt.io


________________________________________
From: interest-bounces+gabriel.dedietrich=theqtcompany....@qt-project.org 
<interest-bounces+gabriel.dedietrich=theqtcompany....@qt-project.org> on behalf 
of maitai <mai...@virtual-winds.org>
Sent: Thursday, June 11, 2015 8:37 PM
To: Interest@qt-project.org
Subject: [Interest] problem with QFontComboBox on mac/os

Hello,

I'm using qt 5.4.2 on Mac OS X 10.0-YOSEMITE.

I have a plain basic QFontComboxBox with all default options (all fonts
allowed, etc). I'm trying to set the current font to whatever is
QApplication::font().

I tried both

box->setCurrentText(qApp->font().family());

and

box->setCurrentFont(qApp->font());

but this does not work, because strangely enough there is no such family
font listed in the QFontComboBox...

qApp->font().family() returns ".Helvetica Neue DeskInterface". The
closest match in the list is "Helvetica Neue" but it cannot find it.

As a result when the user presses OK the font is set to the first font
listed, which is "Al Bayan" and gives nice results if you like fancy
fonts ;)

I ended up removing "." and " DeskInterface" from the string returned by
qApp->font().policy() but this is just sad...

Any clue?

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

Reply via email to