diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-04-01 15:07:18 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-04-04 10:49:07 (GMT) |
commit | 3cdbe0c7bc42f5f3bcb8c2f6d93cbb4d20c720e2 (patch) | |
tree | a9a2940e00c9bccbf01d62e0e728336fe6e2faba /src/gui/text/qfontengine_p.h | |
parent | cb705c2e3c35fa7c6d70a9348477450cddf50633 (diff) | |
download | Qt-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/text/qfontengine_p.h')
-rw-r--r-- | src/gui/text/qfontengine_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index f501141..7b29993 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -203,7 +203,7 @@ public: virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t); virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); - virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix, GlyphFormat /*format*/) + virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, QFixed /*subPixelPosition*/, const QTransform &matrix, GlyphFormat /*format*/) { return boundingBox(glyph, matrix); } |