Move CoreText font engine/database to QtGui
Task-number: QTBUG-83255 Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
cbb9c53704
commit
ce2bc0e2d5
@ -507,6 +507,27 @@ qt_extend_target(Gui CONDITION QT_FEATURE_freetype
|
||||
WrapFreetype::WrapFreetype
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION APPLE
|
||||
SOURCES
|
||||
text/coretext/qcoretextfontdatabase.mm text/coretext/qcoretextfontdatabase_p.h
|
||||
text/coretext/qfontengine_coretext.mm text/coretext/qfontengine_coretext_p.h
|
||||
LIBRARIES
|
||||
${FWCoreFoundation}
|
||||
${FWCoreGraphics}
|
||||
${FWCoreText}
|
||||
${FWFoundation}
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION MACOS
|
||||
LIBRARIES
|
||||
${FWAppKit}
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION UIKIT
|
||||
LIBRARIES
|
||||
${FWUIKit}
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 39:.:image:image/image.pri:WIN32 AND mingw:
|
||||
# GCC_VERSION = "$${QMAKE_GCC_MAJOR_VERSION}.$${QMAKE_GCC_MINOR_VERSION}.$${QMAKE_GCC_PATCH_VERSION}"
|
||||
|
||||
|
@ -132,7 +132,7 @@ void QCoreTextFontDatabase::populateFontDatabase()
|
||||
|
||||
qCDebug(lcQpaFonts) << "Resolving theme fonts took" << elapsed.restart() << "ms";
|
||||
|
||||
Q_FOREACH (CTFontDescriptorRef fontDesc, m_systemFontDescriptors)
|
||||
for (CTFontDescriptorRef fontDesc : m_systemFontDescriptors)
|
||||
populateFromDescriptor(fontDesc);
|
||||
|
||||
qCDebug(lcQpaFonts) << "Populating system descriptors took" << elapsed.restart() << "ms";
|
@ -65,7 +65,7 @@ Q_DECLARE_METATYPE(QCFType<CFURLRef>);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QCoreTextFontDatabase : public QPlatformFontDatabase
|
||||
class Q_GUI_EXPORT QCoreTextFontDatabase : public QPlatformFontDatabase
|
||||
{
|
||||
public:
|
||||
QCoreTextFontDatabase();
|
||||
@ -104,7 +104,7 @@ private:
|
||||
// to generate code for each override in QCoreTextFontDatabase for each T.
|
||||
|
||||
template <class T>
|
||||
class QCoreTextFontDatabaseEngineFactory : public QCoreTextFontDatabase
|
||||
class Q_GUI_EXPORT QCoreTextFontDatabaseEngineFactory : public QCoreTextFontDatabase
|
||||
{
|
||||
public:
|
||||
QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override;
|
@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
|
||||
|
||||
class QCoreTextFontEngine : public QFontEngine
|
||||
class Q_GUI_EXPORT QCoreTextFontEngine : public QFontEngine
|
||||
{
|
||||
Q_GADGET
|
||||
|
||||
@ -152,7 +152,7 @@ protected:
|
||||
mutable bool kerningPairsLoaded;
|
||||
};
|
||||
|
||||
CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef);
|
||||
CGAffineTransform Q_GUI_EXPORT qt_transform_from_fontdef(const QFontDef &fontDef);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -127,3 +127,7 @@ qtConfig(cssparser) {
|
||||
qtConfig(freetype) {
|
||||
include($$PWD/freetype/freetype.pri)
|
||||
}
|
||||
|
||||
darwin {
|
||||
include($$PWD/coretext/coretext.pri)
|
||||
}
|
||||
|
@ -25,27 +25,6 @@ qt_add_module(FontDatabaseSupport
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(FontDatabaseSupport CONDITION APPLE
|
||||
SOURCES
|
||||
mac/qcoretextfontdatabase.mm mac/qcoretextfontdatabase_p.h
|
||||
mac/qfontengine_coretext.mm mac/qfontengine_coretext_p.h
|
||||
LIBRARIES
|
||||
${FWCoreFoundation}
|
||||
${FWCoreGraphics}
|
||||
${FWCoreText}
|
||||
${FWFoundation}
|
||||
)
|
||||
|
||||
qt_extend_target(FontDatabaseSupport CONDITION MACOS
|
||||
LIBRARIES
|
||||
${FWAppKit}
|
||||
)
|
||||
|
||||
qt_extend_target(FontDatabaseSupport CONDITION APPLE AND NOT MACOS
|
||||
LIBRARIES
|
||||
${FWUIKit}
|
||||
)
|
||||
|
||||
qt_extend_target(FontDatabaseSupport CONDITION QT_FEATURE_freetype
|
||||
LIBRARIES
|
||||
WrapFreetype::WrapFreetype
|
||||
|
@ -7,10 +7,6 @@ CONFIG += static internal_module
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
darwin {
|
||||
include($$PWD/mac/coretext.pri)
|
||||
}
|
||||
|
||||
unix {
|
||||
include($$PWD/genericunix/genericunix.pri)
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ SUBDIRS = \
|
||||
fbconvenience \
|
||||
themes
|
||||
|
||||
qtConfig(freetype)|darwin|win32: \
|
||||
if(qtConfig(freetype):!darwin)|win32: \
|
||||
SUBDIRS += fontdatabases
|
||||
|
||||
qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid)|qtConfig(xkbcommon) {
|
||||
|
@ -58,7 +58,6 @@ qt_internal_add_plugin(QCocoaIntegrationPlugin
|
||||
Cups::Cups
|
||||
Qt::Core
|
||||
Qt::CorePrivate
|
||||
Qt::FontDatabaseSupportPrivate
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
Qt::ThemeSupportPrivate
|
||||
|
@ -96,8 +96,7 @@ DEFINES += QT_NO_FOREACH
|
||||
|
||||
QT += \
|
||||
core-private gui-private \
|
||||
theme_support-private \
|
||||
fontdatabase_support-private
|
||||
theme_support-private
|
||||
|
||||
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qcoretextfontdatabase_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
#include <QtGui/private/qcoregraphics_p.h>
|
||||
|
||||
#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
|
||||
#include <QtGui/private/qfontengine_coretext_p.h>
|
||||
|
||||
#if QT_CONFIG(opengl)
|
||||
#include <QtPlatformCompositorSupport/qpa/qplatformbackingstoreopenglsupport.h>
|
||||
|
@ -56,8 +56,8 @@
|
||||
#include <QtGui/private/qcoregraphics_p.h>
|
||||
#include <QtGui/qpainter.h>
|
||||
#include <QtGui/qtextformat.h>
|
||||
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
|
||||
#include <QtGui/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qfontengine_coretext_p.h>
|
||||
#include <QtThemeSupport/private/qabstractfileiconengine_p.h>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
|
@ -33,7 +33,6 @@ add_qt_plugin(QIOSIntegrationPlugin
|
||||
${FWUIKit}
|
||||
Qt::Core
|
||||
Qt::CorePrivate
|
||||
Qt::FontDatabaseSupportPrivate
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
)
|
||||
|
@ -6,8 +6,7 @@ TARGET = qios
|
||||
qtConfig(shared): CONFIG += static
|
||||
|
||||
QT += \
|
||||
core-private gui-private \
|
||||
fontdatabase_support-private
|
||||
core-private gui-private
|
||||
|
||||
qtHaveModule(platformcompositor_support-private): QT += platformcompositor_support-private
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
#include <qoffscreensurface.h>
|
||||
#include <qpa/qplatformoffscreensurface.h>
|
||||
|
||||
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qmacmime_p.h>
|
||||
#include <QDir>
|
||||
#include <QOperatingSystemVersion>
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <QtGui/QFont>
|
||||
#include <QtGui/private/qcoregraphics_p.h>
|
||||
|
||||
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
|
||||
|
@ -2,7 +2,9 @@ TARGET = qminimal
|
||||
|
||||
QT += \
|
||||
core-private gui-private \
|
||||
eventdispatcher_support-private fontdatabase_support-private
|
||||
eventdispatcher_support-private
|
||||
|
||||
!darwin: QT += fontdatabase_support-private
|
||||
|
||||
DEFINES += QT_NO_FOREACH
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
# include <QtFontDatabaseSupport/private/qwindowsfontdatabase_ft_p.h>
|
||||
# endif
|
||||
#elif defined(Q_OS_DARWIN)
|
||||
# include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
# include <QtGui/private/qcoretextfontdatabase_p.h>
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(fontconfig)
|
||||
|
@ -2,7 +2,9 @@ TARGET = qoffscreen
|
||||
|
||||
QT += \
|
||||
core-private gui-private \
|
||||
eventdispatcher_support-private fontdatabase_support-private
|
||||
eventdispatcher_support-private
|
||||
|
||||
!darwin: QT += fontdatabase_support-private
|
||||
|
||||
DEFINES += QT_NO_FOREACH
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
|
||||
#if defined(Q_OS_MAC)
|
||||
#include <qpa/qplatformfontdatabase.h>
|
||||
#include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
|
||||
#include <QtGui/private/qcoretextfontdatabase_p.h>
|
||||
#else
|
||||
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user