summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_ft_p.h
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-03-23 18:35:47 +0100
committerJiang Jiang <jiang.jiang@nokia.com>2011-03-24 15:56:56 +0100
commit47ce3672058d4cc6ca479f8b40d6cb821c38dd51 (patch)
treeabb1c34a72e5f1cdc0206f87b23ac38c8fe85321 /src/gui/text/qfontengine_ft_p.h
parentdcdc7eccf7ff32396816059dc932c358f73cf12b (diff)
Fixed remaining issues in subpixel positioning with FreeType
1. Merge QStaticText and QGlyphs drawing code of raster engine into glyph drawing code for normal QTextItem, it simplify the caching system (we don't use QImageTextureGlyphCache for raster anymore, just glyph set cache in FreeType engine is enough), and fix some regressions in QStaticText and QGlyphs drawing. 2. Fix subpixel positioning support for OpenGL texture glyph cache. Including a transform handling regression introduced by the initial patch. 3. Disable subpixel positioning for bitmap fonts (mono format). After this change, we only have two code paths for glyph rendering with FreeType: raster will always use the simple code path (with QFontEngine_FT cache) while GL will always use QTextureGlyphCache. Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfontengine_ft_p.h')
-rw-r--r--src/gui/text/qfontengine_ft_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index 63fd9a7634..054a57e035 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -254,7 +254,7 @@ private:
virtual glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix);
virtual void recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const;
- virtual QImage alphaMapForGlyph(glyph_t);
+ virtual QImage alphaMapForGlyph(glyph_t, QFixed);
virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t);
virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix,
QFontEngine::GlyphFormat format);
@@ -286,8 +286,8 @@ private:
QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix);
QFixed subPixelPositionForX(QFixed x);
- bool loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs,
- QVarLengthArray<QFixedPoint> &positions,
+ bool loadGlyphs(QGlyphSet *gs, const glyph_t *glyphs, int num_glyphs,
+ const QFixedPoint *positions,
GlyphFormat format = Format_Render);
#if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)