summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-04-01 11:51:06 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-04-01 12:16:44 (GMT)
commitbf03b38d2b32a0cfca181398597884e4252466f4 (patch)
tree87dcde787f8f3c7b115844fbfb1b7078c9f78727 /src/gui/painting/qpaintengine_raster.cpp
parent70dde9c60e2ed9f8b9a15bc5c656fda972e69d97 (diff)
downloadQt-bf03b38d2b32a0cfca181398597884e4252466f4.zip
Qt-bf03b38d2b32a0cfca181398597884e4252466f4.tar.gz
Qt-bf03b38d2b32a0cfca181398597884e4252466f4.tar.bz2
Make sure we don't use subpixel positions in full hinting mode
Some of the text can start from subpixel positions (start from 100.5 for instance), we need to make sure they stick to pixel grid in this case. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 9f3b9b9..6902543 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3191,15 +3191,10 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
rightShift = 3; // divide by 8
int margin = cache->glyphMargin();
-
- bool supportsSubPixelPositions = fontEngine->supportsSubPixelPositions();
-
const uchar *bits = image.bits();
for (int i=0; i<numGlyphs; ++i) {
- QFixed subPixelPosition;
- if (supportsSubPixelPositions)
- subPixelPosition = cache->subPixelPositionForX(positions[i].x);
+ QFixed subPixelPosition = cache->subPixelPositionForX(positions[i].x);
QTextureGlyphCache::GlyphAndSubPixelPosition glyph(glyphs[i], subPixelPosition);
const QTextureGlyphCache::Coord &c = cache->coords[glyph];
if (c.isNull())