summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp9
2 files changed, 6 insertions, 9 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
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 9e5707d..a192e87 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -229,16 +229,9 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
int QImageTextureGlyphCache::glyphMargin() const
{
-#ifdef Q_WS_MAC
-
-#ifdef QT_MAC_USE_COCOA
- // For cocoa the margin is built into the glyph it seems..
+#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
return 0;
#else
- return 2;
-#endif
-
-#else
return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0;
#endif
}