summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-05-22 11:17:29 +0200
committerTrond Kjernåsen <trond@trolltech.com>2009-05-22 11:17:29 +0200
commit815a8c4a297cde2b8f778c4afa36958e324f8ead (patch)
tree8572801c4330e94f92dba07b517400a79786c64c /src/gui
parent308a105bf6ae6eb5702440728428a96b5806b085 (diff)
Fixed an issue with text drawing to QImages on Mac/Cocoa.
We currently don't support subpixel hinting when drawing text to a QImage on Mac. The alpha map that is returned by the font engine is a plain 8 bit gray mask, which means we have to switch off subpixel hinting when we draw the glyph for caching. Task-number: 249178 Reviewed-by: Samuel
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine_mac.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 425cab2f55..d397e4a2bc 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -553,7 +553,9 @@ QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph)
8, im.bytesPerLine(), colorspace,
cgflags);
CGContextSetFontSize(ctx, fontDef.pixelSize);
- CGContextSetShouldAntialias(ctx, fontDef.pointSize > qt_antialiasing_threshold && !(fontDef.styleStrategy & QFont::NoAntialias));
+ CGContextSetShouldAntialias(ctx, fontDef.pointSize > qt_antialiasing_threshold
+ && !(fontDef.styleStrategy & QFont::NoAntialias));
+ CGContextSetShouldSmoothFonts(ctx, false);
CGAffineTransform oldTextMatrix = CGContextGetTextMatrix(ctx);
CGAffineTransform cgMatrix = CGAffineTransformMake(1, 0, 0, 1, 0, 0);