From de58eb64bc564fcb8af61a45576783e432d2380c Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 23 Oct 2012 13:14:27 +0200 Subject: Revert hacks in text rendering code path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are a lot of hacks here and there in Qt trying to align the text in a correct way which caused regressions to appear once the default coordinate system changed. We need to remove these hacks to get a more consistent and maintainable base. This also fixes the regression introduced by changing the aliased coordinate system. Task-number: QTBUG-27667 Change-Id: I620db2ca23b7ff6c912f3a51e86e7e36bbef81f0 Reviewed-by: Samuel Rødal --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/opengl/gl2paintengineex') diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index e542397663..7284efa53b 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1675,7 +1675,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp continue; int x = qFloor(staticTextItem->glyphPositions[i].x) + c.baseLineX - margin; - int y = qFloor(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin; + int y = qRound(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin; vertexCoordinates->addQuad(QRectF(x, y, c.w, c.h)); textureCoordinates->addQuad(QRectF(c.x*dx, c.y*dy, c.w * dx, c.h * dy)); -- cgit v1.2.3