summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-09-07 13:57:07 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-09-09 17:12:04 +0200
commitb7ef9d49a969f512ecbc7ad940642f3a74e348ad (patch)
treea73e4b3fd5a8ffd6b2055f83618f56dfd6ef129a /src/gui/text/qfontengine.cpp
parentde1b1cd7a6a15755bd5f049533791554c933686c (diff)
Support sub pixel positioning of glyphs in raster engine
For the raster engine to provide the same quality of text rendering as the native engine on Mac Cocoa, we need to support rendering to different sub pixel positions for each glyph. The number of subpixel positions is arbitrary and has to be detected, but it's usually three or four. Each position will give slightly different coverages inside the pixel and thus different rasterizations. Other font engines which support sub pixel positioning of glyphs can provide the same functionality by implementing supportsSubPixelPositions() to return true, and then adding the subPixelPosition argument to the x coordinate used in alphaRGBMapForGlyph(). Task-number: QTBUG-5053 Reviewed-by: Jiang Jiang
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 1b94915d7f..55d2a839ae 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -616,7 +616,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
return i;
}
-QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int /* margin */, const QTransform &t)
+QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/, int /* margin */, const QTransform &t)
{
QImage alphaMask = alphaMapForGlyph(glyph, t);
QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32);