From 278c2b360aba87db2d1e5a2d3e14de7260d8a16e Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Fri, 3 Jun 2011 16:03:00 +0200 Subject: Correct antialias disabling logic for Core Text We should always turn antialias off when QFont::NoAntialias being passed in styleStrategy. That corrects some QStaticText tests. Change-Id: Iaffc5f3bb7f501dcb648cab41a8b6ffcf93f90ae Reviewed-on: http://codereview.qt.nokia.com/328 Reviewed-by: Qt Sanity Bot Reviewed-by: Jiang Jiang (cherry picked from commit c25495dba7eff32b66119737552905787e97e665) --- src/gui/text/qfontengine_coretext.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm index 982c271..75b4e1f 100644 --- a/src/gui/text/qfontengine_coretext.mm +++ b/src/gui/text/qfontengine_coretext.mm @@ -745,9 +745,8 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition 8, im.bytesPerLine(), colorspace, cgflags); CGContextSetFontSize(ctx, fontDef.pixelSize); - CGContextSetShouldAntialias(ctx, aa || - (fontDef.pointSize > qt_antialiasing_threshold - && !(fontDef.styleStrategy & QFont::NoAntialias))); + CGContextSetShouldAntialias(ctx, (aa || fontDef.pointSize > qt_antialiasing_threshold) + && !(fontDef.styleStrategy & QFont::NoAntialias)); CGContextSetShouldSmoothFonts(ctx, aa); CGAffineTransform oldTextMatrix = CGContextGetTextMatrix(ctx); CGAffineTransform cgMatrix = CGAffineTransformMake(1, 0, 0, 1, 0, 0); -- cgit v0.12