diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2010-11-10 13:18:08 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2010-11-10 14:27:27 (GMT) |
commit | 46d2d05e3a95eefae1c72f55d57cbea4ce27d14e (patch) | |
tree | e03ec2b7d593dda532db338bcade35949d841b0f /src/gui/text/qfontengine_p.h | |
parent | 60a30394e3df9f7674d9c7c5b70f4963c2b1f293 (diff) | |
download | Qt-46d2d05e3a95eefae1c72f55d57cbea4ce27d14e.zip Qt-46d2d05e3a95eefae1c72f55d57cbea4ce27d14e.tar.gz Qt-46d2d05e3a95eefae1c72f55d57cbea4ce27d14e.tar.bz2 |
Support glyph subpixel positioning without subpixel rendering
Previously subpixel positioning was only used when subpixel rendering
is enabled (glyphType == Raster_RGBMask), however, it does not
necessarily require that and for Mac OS X it will keep using
subpixel positioning even when LCD font smoothing (subpixel rendering)
is turned off. To maintain consistency when switching to raster,
we should support subpixel positioning in this case.
Task-number: QTBUG-5053
Reviewed-by: Jørgen Lind
Diffstat (limited to 'src/gui/text/qfontengine_p.h')
-rw-r--r-- | src/gui/text/qfontengine_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 6d6daaa..061bcfd 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -197,6 +197,7 @@ public: */ virtual QImage alphaMapForGlyph(glyph_t); virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t); + 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*/) @@ -473,7 +474,7 @@ public: virtual FaceId faceId() const; virtual bool getSfntTableData(uint /*tag*/, uchar * /*buffer*/, uint * /*length*/) const; virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics); - virtual QImage alphaMapForGlyph(glyph_t); + virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t); virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); virtual qreal minRightBearing() const; virtual qreal minLeftBearing() const; |