summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_coretext.mm
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-07-07 13:08:10 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2011-07-07 13:15:10 +0200
commitbd476c6e4b238290a92cfd4693c709e9010b282b (patch)
tree1dc8ef3a0ca81740c51f017b26c66a1d5594c673 /src/gui/text/qfontengine_coretext.mm
parentba65e2741c47912a800132b90f7dbaf2551b04c4 (diff)
Revert 344a4dcfe and part of 93bce787
Due to subpixel grid change, these changes are no longer needed. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfontengine_coretext.mm')
-rw-r--r--src/gui/text/qfontengine_coretext.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm
index afeb0a0e51..6a9201dd4c 100644
--- a/src/gui/text/qfontengine_coretext.mm
+++ b/src/gui/text/qfontengine_coretext.mm
@@ -718,8 +718,9 @@ void QCoreTextFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *position
QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, int margin, bool aa)
{
+ Q_UNUSED(margin);
const glyph_metrics_t br = boundingBox(glyph);
- QImage im(qRound(br.width) + margin * 2, qRound(br.height) + margin * 2, QImage::Format_RGB32);
+ QImage im(qRound(br.width) + 2, qRound(br.height) + 2, QImage::Format_RGB32);
im.fill(0);
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
@@ -750,8 +751,8 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition
CGContextSetFont(ctx, cgFont);
- qreal pos_x = -br.x.round().truncate() + subPixelPosition.toReal() + margin;
- qreal pos_y = im.height() + br.y.toReal() - margin;
+ qreal pos_x = -br.x.round().truncate() + subPixelPosition.toReal();
+ qreal pos_y = im.height() + br.y.toReal();
CGContextSetTextPosition(ctx, pos_x, pos_y);
CGSize advance;