summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-10-21 11:31:07 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-10-21 11:31:07 (GMT)
commit3be273fc751624fab078878904ad3cb483cd141f (patch)
tree506e72bee69821db1c9ec7fc2bdf4ece23abf3e5 /src/gui/painting/qpaintengine_raster.cpp
parent84cfe9af5e333872ac67368a6b14c377ceeda8ec (diff)
downloadQt-3be273fc751624fab078878904ad3cb483cd141f.zip
Qt-3be273fc751624fab078878904ad3cb483cd141f.tar.gz
Qt-3be273fc751624fab078878904ad3cb483cd141f.tar.bz2
Properly detect font smoothing setting on Mac OS X in raster engine
We would assume font smoothing on the mac was always turned on, giving poor text rendering in the cases where it was not. This implementation mirrors querying the cleartype setting on Windows, checking the setting on application initialization and rendering into an 8 bit cache if it is turned off. Task-number: QTBUG-4881 Reviewed-by: Morten Johan Sørvig
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index fab2d8d..fd0e810 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -132,6 +132,10 @@ static const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
extern bool qt_cleartype_enabled;
#endif
+#ifdef Q_WS_MAC
+extern bool qt_applefontsmoothing_enabled;
+#endif
+
/********************************************************************************
* Span functions
@@ -508,7 +512,7 @@ bool QRasterPaintEngine::begin(QPaintDevice *device)
#if defined(Q_WS_WIN)
else if (qt_cleartype_enabled)
#elif defined (Q_WS_MAC)
- else if (true)
+ else if (qt_applefontsmoothing_enabled)
#else
else if (false)
#endif