summaryrefslogtreecommitdiff
path: root/patches/qt4/patch-qfontdatabase.diff
blob: c0788906966aa0601bc39f702439a0f05067b66b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- src/gui/text/qfontdatabase.cpp	2013-06-07 01:16:59.000000000 -0400
+++ src/gui/text/qfontdatabase_new-bb2beddc3ae55c4676d190d0ac99aa32d322a6a5.cpp	2013-12-08 14:51:10.000000000 -0500
@@ -441,6 +441,7 @@
 #endif
 #if !defined(QWS) && defined(Q_OS_MAC)
     bool fixedPitchComputed : 1;
+    QString postscriptName;
 #endif
 #ifdef Q_WS_X11
     bool symbol_checked : 1;
--- src/gui/text/qfontdatabase_mac.cpp	2013-06-07 01:16:59.000000000 -0400
+++ src/gui/text/qfontdatabase_mac_new-41f29865db84152efb41c048470f713353a0a84c.cpp	2013-12-08 14:51:05.000000000 -0500
@@ -147,6 +147,7 @@
         QCFString family_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL);
         QCFString style_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL);
         QtFontFamily *family = db->family(family_name, true);
+        family->postscriptName = QCFString((CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontNameAttribute));
 
         if (QCFType<CFArrayRef> languages = (CFArrayRef) CTFontDescriptorCopyAttribute(font, kCTFontLanguagesAttribute)) {
             CFIndex length = CFArrayGetCount(languages);
@@ -327,7 +328,7 @@
             if (db->families[k]->name.compare(family_list.at(i), Qt::CaseInsensitive) == 0) {
                 QByteArray family_name = db->families[k]->name.toUtf8();
 #if defined(QT_MAC_USE_COCOA)
-                QCFType<CTFontRef> ctFont = CTFontCreateWithName(QCFString(db->families[k]->name), 12, NULL);
+                QCFType<CTFontRef> ctFont = CTFontCreateWithName(QCFString(db->families[k]->postscriptName), 12, NULL);
                 if (ctFont) {
                     fontName = CTFontCopyFullName(ctFont);
                     goto found;
contact: Jan Huwald // Impressum