diff options
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_mac.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_mac_p.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp index 14ba94e..e5323d8 100644 --- a/src/gui/painting/qpaintengine_mac.cpp +++ b/src/gui/painting/qpaintengine_mac.cpp @@ -1390,7 +1390,11 @@ QCoreGraphicsPaintEngine::updateRenderHints(QPainter::RenderHints hints) CGContextSetInterpolationQuality(d->hd, (hints & QPainter::SmoothPixmapTransform) ? kCGInterpolationHigh : kCGInterpolationNone); } - CGContextSetShouldSmoothFonts(d->hd, hints & QPainter::TextAntialiasing); + bool textAntialiasing = (hints & QPainter::TextAntialiasing) == QPainter::TextAntialiasing; + if (!textAntialiasing || d->disabledSmoothFonts) { + d->disabledSmoothFonts = !textAntialiasing; + CGContextSetShouldSmoothFonts(d->hd, textAntialiasing); + } } /* diff --git a/src/gui/painting/qpaintengine_mac_p.h b/src/gui/painting/qpaintengine_mac_p.h index c9ab419..940b2bc 100644 --- a/src/gui/painting/qpaintengine_mac_p.h +++ b/src/gui/painting/qpaintengine_mac_p.h @@ -148,7 +148,7 @@ class QCoreGraphicsPaintEnginePrivate : public QPaintEnginePrivate Q_DECLARE_PUBLIC(QCoreGraphicsPaintEngine) public: QCoreGraphicsPaintEnginePrivate() - : hd(0), shading(0), stackCount(0), complexXForm(false) + : hd(0), shading(0), stackCount(0), complexXForm(false), disabledSmoothFonts(false) { } @@ -168,6 +168,7 @@ public: CGShadingRef shading; int stackCount; bool complexXForm; + bool disabledSmoothFonts; enum { CosmeticNone, CosmeticTransformPath, CosmeticSetPenWidth } cosmeticPen; // pixel and cosmetic pen size in user coordinates. |