diff options
Diffstat (limited to 'src/platformsupport/fontdatabases')
5 files changed, 12 insertions, 12 deletions
diff --git a/src/platformsupport/fontdatabases/mac/coretext.pri b/src/platformsupport/fontdatabases/mac/coretext.pri index d9ffb85f96..272e7591ba 100644 --- a/src/platformsupport/fontdatabases/mac/coretext.pri +++ b/src/platformsupport/fontdatabases/mac/coretext.pri @@ -7,8 +7,8 @@ contains(QT_CONFIG, freetype) { SOURCES += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp } -ios: \ - # On iOS CoreText and CoreGraphics are stand-alone frameworks +uikit: \ + # On iOS/tvOS CoreText and CoreGraphics are stand-alone frameworks LIBS_PRIVATE += -framework CoreText -framework CoreGraphics else: \ # On Mac OS they are part of the ApplicationServices umbrella framework, diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index df39dcf6be..bea32950be 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -44,7 +44,7 @@ #if defined(Q_OS_OSX) #import <AppKit/AppKit.h> #import <IOKit/graphics/IOGraphicsLib.h> -#elif defined(Q_OS_IOS) +#elif defined(QT_PLATFORM_UIKIT) #import <UIKit/UIFont.h> #endif @@ -191,7 +191,7 @@ static CFArrayRef availableFamilyNames() { #if defined(Q_OS_OSX) return CTFontManagerCopyAvailableFontFamilyNames(); -#elif defined(Q_OS_IOS) +#elif defined(QT_PLATFORM_UIKIT) return (CFArrayRef) [[UIFont familyNames] retain]; #endif } @@ -847,7 +847,7 @@ static CTFontUIFontType fontTypeFromTheme(QPlatformTheme::Font f) static CTFontDescriptorRef fontDescriptorFromTheme(QPlatformTheme::Font f) { -#ifdef Q_OS_IOS +#if defined(QT_PLATFORM_UIKIT) if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_7_0) { // Use Dynamic Type to resolve theme fonts if possible, to get // correct font sizes and style based on user configuration. @@ -881,7 +881,7 @@ static CTFontDescriptorRef fontDescriptorFromTheme(QPlatformTheme::Font f) return static_cast<CTFontDescriptorRef>(CFBridgingRetain(desc)); } } -#endif // Q_OS_IOS +#endif // Q_OS_IOS, Q_OS_TVOS // OSX default case and iOS fallback case CTFontUIFontType fontType = fontTypeFromTheme(f); diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h index 2cc6b09a15..d3f891fd4d 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h @@ -59,7 +59,7 @@ #include <qpa/qplatformtheme.h> #include <private/qcore_mac_p.h> -#ifndef Q_OS_IOS +#ifdef Q_OS_OSX #include <ApplicationServices/ApplicationServices.h> #else #include <CoreText/CoreText.h> diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index bbc5cf0c8f..88d80d19ae 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -181,7 +181,7 @@ void QCoreTextFontEngine::init() synthesisFlags = 0; CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(ctfont); -#if defined(Q_OS_IOS) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 +#if defined(QT_PLATFORM_UIKIT) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (supportsColorGlyphs() && (traits & kCTFontColorGlyphsTrait)) glyphFormat = QFontEngine::Format_ARGB; else @@ -568,7 +568,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition if (!im.width() || !im.height()) return im; -#ifndef Q_OS_IOS +#ifdef Q_OS_OSX CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); #else CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); @@ -617,7 +617,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition CGContextShowGlyphsWithAdvances(ctx, &cgGlyph, &CGSizeZero, 1); } } -#if defined(Q_OS_IOS) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 +#if defined(QT_PLATFORM_UIKIT) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 else if (supportsColorGlyphs()) { // CGContextSetTextMatrix does not work with color glyphs, so we use // the CTM instead. This means we must translate the CTM as well, to diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h index 8a487f0ff0..27289239c6 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h @@ -54,7 +54,7 @@ #include <private/qfontengine_p.h> #include <private/qcore_mac_p.h> -#ifndef Q_OS_IOS +#ifdef Q_OS_OSX #include <ApplicationServices/ApplicationServices.h> #else #include <CoreText/CoreText.h> @@ -118,7 +118,7 @@ public: static bool supportsColorGlyphs() { -#if defined(Q_OS_IOS) +#if defined(QT_PLATFORM_UIKIT) return true; #elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 |