summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2013-08-05 13:55:35 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-05 15:03:28 (GMT)
commit719adaaa12991530d066bef4b65257ef66dd951c (patch)
tree9cbaf74f4b07bfd5eb58a3bae953da9026532680 /src/gui
parent7bf4381a95bb4812f5a74419099a1a18f7a536a7 (diff)
downloadQt-719adaaa12991530d066bef4b65257ef66dd951c.zip
Qt-719adaaa12991530d066bef4b65257ef66dd951c.tar.gz
Qt-719adaaa12991530d066bef4b65257ef66dd951c.tar.bz2
Return the correct system font on OS X Mavericks.
Also prints a warning if other private system fonts are encountered. Task-number: QTBUG-32789 Change-Id: I04e1471d25119caddb587972561e98defb1ffda1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qt_mac.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_mac.cpp b/src/gui/kernel/qt_mac.cpp
index 5d9c03e..ef0df5f 100644
--- a/src/gui/kernel/qt_mac.cpp
+++ b/src/gui/kernel/qt_mac.cpp
@@ -67,6 +67,13 @@ QFont qfontForThemeFont(ThemeFontID themeID)
#else
QCFType<CTFontRef> ctfont = CopyCTThemeFont(themeID);
QString familyName = QCFString(CTFontCopyFamilyName(ctfont));
+
+ // Fix for the new private UI font on Mavericks
+ if (familyName == QLatin1String(".Lucida Grande UI"))
+ familyName = QLatin1String("Lucida Grande");
+ else if (familyName.startsWith(QLatin1String(".")))
+ qWarning("Qt: qfontForThemeFont: encountered unknown private system font: %s", familyName.toLatin1().constData());
+
QCFType<CFDictionaryRef> dict = CTFontCopyTraits(ctfont);
CFNumberRef num = static_cast<CFNumberRef>(CFDictionaryGetValue(dict, kCTFontWeightTrait));
float fW;