From a80a8b4703288c5bc2c0d5cc638defe0ae87af29 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Tue, 15 Nov 2011 13:59:36 +0100 Subject: Mac Core Text font database for QPA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Core Text fontdatabase for Mac and use it as default. It also reenabled Core Text font engine for native font rendering on Mac, though it's not used in declarative UI (by default declarative will still use scenegraph, which will only use this font engine for retrieving font metrics and outlines). With the new fontdatabase it's now possible to load all the fonts installed in the system as well as adding application fonts. Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/cocoa.pro | 4 +--- src/plugins/platforms/cocoa/qcocoaintegration.mm | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index 3d42b02df6..d59a0f1a0d 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -51,12 +51,10 @@ HEADERS += qcocoaintegration.h \ FORMS += $$PWD/../../../widgets/dialogs/qfiledialog.ui RESOURCES += qcocoaresources.qrc -#add libz for freetype. -LIBS += -lz -framework Cocoa +LIBS += -framework Cocoa QT += core-private gui-private widgets-private platformsupport-private -CONFIG += qpa/basicunixfontdatabase target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index f7f8452e5a..353ed0f4f0 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -59,7 +59,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE @@ -87,7 +87,7 @@ QCocoaScreen::~QCocoaScreen() } QCocoaIntegration::QCocoaIntegration() - : mFontDb(new QBasicFontDatabase()) + : mFontDb(new QCoreTextFontDatabase()) , mEventDispatcher(new QCocoaEventDispatcher()) { mPool = new QCocoaAutoReleasePool; -- cgit v1.2.3