summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm')
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index d81a68d6e5..1a17f75488 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -212,6 +212,12 @@ void QCoreTextFontDatabase::populateFontDatabase()
if (familyName.startsWith(QLatin1Char('.')) || familyName == QLatin1String("LastResort"))
continue;
+#if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
+ // Skip font families with no corresponding fonts
+ if (![UIFont fontNamesForFamilyName:(NSString*)familyNameRef].count)
+ continue;
+#endif
+
QPlatformFontDatabase::registerFontFamily(familyName);
#if defined(Q_OS_OSX)