diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2010-06-04 19:51:59 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2010-06-07 16:00:51 +0200 |
commit | 5d130f9682fbd3dc8c469468e805854fd70a11ea (patch) | |
tree | 93fa8ed4711472c03616a96e659fbf253c572d51 /src/gui/text/qfontengine_s60_p.h | |
parent | 53a3b44aea9d2e331b0359b23512b778b520091a (diff) |
Retrieve proper glyph outlines from Symbian^4
Up until Symbian^4, the Symbian font Api does not provide access to the
vector data of glyphs. In order to make QPainterPath::addText() and
transformed text rendering work, Qt falls back to a workaound: Tracing
the bitmap of a rasterized glyph. That is neither performant nor is the
result of good quality.
Symbian^4 will add Api that returns glyph outlines encoded as SVG paths.
The code in this commit essentially parses the SVG path and returns a
QPainterPath. The parsing part took some ideas from QSvg, and is
implemented in a very reduced way.
Task-number: QT-809
Reviewed-by: Aleksandar Sasha Babic
Diffstat (limited to 'src/gui/text/qfontengine_s60_p.h')
-rw-r--r-- | src/gui/text/qfontengine_s60_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index dea32c489f..beeb4cc252 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -62,6 +62,10 @@ #define Q_SYMBIAN_HAS_FONTTABLE_API #endif +#ifdef Q_SYMBIAN_HAS_FONTTABLE_API +#define Q_SYMBIAN_HAS_GLYPHOUTLINE_API +#endif // Q_SYMBIAN_HAS_FONTTABLE_API + class CFont; QT_BEGIN_NAMESPACE @@ -97,6 +101,9 @@ public: bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const; void recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const; + void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, + QPainterPath *path, QTextItem::RenderFlags flags); + QImage alphaMapForGlyph(glyph_t glyph); glyph_metrics_t boundingBox(const QGlyphLayout &glyphs); |