diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-05-23 12:25:53 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-05-23 12:29:18 (GMT) |
commit | ddfd45c1be13f695b106f10af7a4d0bc66059df6 (patch) | |
tree | 6e850533db625f2a499a7c90890ad35830ac8148 /src/gui/painting/qpaintengine_raster.cpp | |
parent | 5338d78aa9d80ddd2bcb21e6b22cd2cf1522a7d3 (diff) | |
download | Qt-ddfd45c1be13f695b106f10af7a4d0bc66059df6.zip Qt-ddfd45c1be13f695b106f10af7a4d0bc66059df6.tar.gz Qt-ddfd45c1be13f695b106f10af7a4d0bc66059df6.tar.bz2 |
Revert the revert of subpixel positions interpretation for text
So that text rendering with raster engine on Mac can be the same
as with native engine.
Reviewed-by: Eskil
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 7dda940..592bf12 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2880,7 +2880,6 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, rightShift = 3; // divide by 8 int margin = cache->glyphMargin(); - const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta); const uchar *bits = image.bits(); for (int i=0; i<numGlyphs; ++i) { @@ -2890,8 +2889,8 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, if (c.isNull()) continue; - int x = qFloor(positions[i].x + offs) + c.baseLineX - margin; - int y = qFloor(positions[i].y + offs) - c.baseLineY - margin; + int x = qFloor(positions[i].x) + c.baseLineX - margin; + int y = qFloor(positions[i].y) - c.baseLineY - margin; // printf("drawing [%d %d %d %d] baseline [%d %d], glyph: %d, to: %d %d, pos: %d %d\n", // c.x, c.y, |