summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/mac
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/fontdatabases/mac')
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm18
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm2
2 files changed, 14 insertions, 6 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 91c2dc8cf0..898432e602 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -50,7 +50,9 @@
#include "qcoretextfontdatabase_p.h"
#include "qfontengine_coretext_p.h"
+#if QT_CONFIG(settings)
#include <QtCore/QSettings>
+#endif
#include <QtCore/QtEndian>
#ifndef QT_NO_FREETYPE
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
@@ -116,21 +118,25 @@ QCoreTextFontDatabase::QCoreTextFontDatabase()
: m_hasPopulatedAliases(false)
{
#ifdef Q_OS_MACX
- QSettings appleSettings(QLatin1String("apple.com"));
- QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold"));
- if (appleValue.isValid())
- QCoreTextFontEngine::antialiasingThreshold = appleValue.toInt();
-
/*
font_smoothing = 0 means no smoothing, while 1-3 means subpixel
antialiasing with different hinting styles (but we don't care about the
exact value, only if subpixel rendering is available or not)
*/
int font_smoothing = 0;
+
+#if QT_CONFIG(settings)
+ QSettings appleSettings(QLatin1String("apple.com"));
+ QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold"));
+ if (appleValue.isValid())
+ QCoreTextFontEngine::antialiasingThreshold = appleValue.toInt();
+
appleValue = appleSettings.value(QLatin1String("AppleFontSmoothing"));
if (appleValue.isValid()) {
font_smoothing = appleValue.toInt();
- } else {
+ } else
+#endif // settings
+ {
// non-Apple displays do not provide enough information about subpixel rendering so
// draw text with cocoa and compare pixel colors to see if subpixel rendering is enabled
int w = 10;
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index 98b753eff9..57ae622891 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -41,7 +41,9 @@
#include <qpa/qplatformfontdatabase.h>
#include <QtCore/qendian.h>
+#if QT_CONFIG(settings)
#include <QtCore/qsettings.h>
+#endif
#include <private/qimage_p.h>