diff options
author | Marius Kintel <marius@kintel.net> | 2013-12-08 20:16:58 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-12-08 20:16:58 (GMT) |
commit | 88cc7edafd47ec167609c05eb22c3f8eb642d225 (patch) | |
tree | a9b47b56a3884f83d3c6e469b6c4c45dc1c57060 /patches/qt4/patch-qfontdatabase.diff | |
parent | b131464f954b2d10f6b065b45038652af2379742 (diff) |
#559 Fix Qt font rendering on OS X 10.9
Diffstat (limited to 'patches/qt4/patch-qfontdatabase.diff')
-rw-r--r-- | patches/qt4/patch-qfontdatabase.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/qt4/patch-qfontdatabase.diff b/patches/qt4/patch-qfontdatabase.diff new file mode 100644 index 0000000..c078890 --- /dev/null +++ b/patches/qt4/patch-qfontdatabase.diff @@ -0,0 +1,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; |