summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-04-01 15:07:18 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-04-04 10:49:07 (GMT)
commit3cdbe0c7bc42f5f3bcb8c2f6d93cbb4d20c720e2 (patch)
treea9a2940e00c9bccbf01d62e0e728336fe6e2faba /src/gui/painting
parentcb705c2e3c35fa7c6d70a9348477450cddf50633 (diff)
downloadQt-3cdbe0c7bc42f5f3bcb8c2f6d93cbb4d20c720e2.zip
Qt-3cdbe0c7bc42f5f3bcb8c2f6d93cbb4d20c720e2.tar.gz
Qt-3cdbe0c7bc42f5f3bcb8c2f6d93cbb4d20c720e2.tar.bz2
Fix positioning in GL2 paint engine with subpixel antialiasing
In this case we will use QTextureGlyphCache with FreeType renderer, which requires the subpixel positition to get correct left bearings, thus alphaMapBoundingBox is extended to support subPixelPosition. In QFontEngineFT we also simplify the code a bit by reusing loadGlyphs for metrics calculation instead of duplicate code. Since we need to use the glyphs after all, cache them here in alphaMapBoundingBox shouldn't be a problem. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 727852d..53f025f 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -168,7 +168,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
continue;
if (listItemCoordinates.contains(GlyphAndSubPixelPosition(glyph, subPixelPosition)))
continue;
- glyph_metrics_t metrics = fontEngine->alphaMapBoundingBox(glyph, m_transform, format);
+ glyph_metrics_t metrics = fontEngine->alphaMapBoundingBox(glyph, subPixelPosition, m_transform, format);
#ifdef CACHE_DEBUG
printf("(%4x): w=%.2f, h=%.2f, xoff=%.2f, yoff=%.2f, x=%.2f, y=%.2f\n",