summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-22 12:40:54 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-22 12:58:06 (GMT)
commitc3dd4b356e277c8ec2a2634dbae04cdc7e798ca9 (patch)
tree4098ec4dc81c7098ee5a3efdf809f20441ce0adb /src/gui/text/qfontengine_p.h
parentd097610e5cddf946b2c16aa68acc6ebd07aa2f44 (diff)
downloadQt-c3dd4b356e277c8ec2a2634dbae04cdc7e798ca9.zip
Qt-c3dd4b356e277c8ec2a2634dbae04cdc7e798ca9.tar.gz
Qt-c3dd4b356e277c8ec2a2634dbae04cdc7e798ca9.tar.bz2
Recommit 1ebeb971d3382aec0fff927
This reverts commit 725c2c29c192349016b1332824a7716bbb992f31 which reverted the original commit because of a test failure on qws. This recommit adds a test for whether the metrics from QFontEngine::boundingBox() are valid, which is required for the bearings to be calculated. This test was also in the original logic.
Diffstat (limited to 'src/gui/text/qfontengine_p.h')
-rw-r--r--src/gui/text/qfontengine_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 71ab5a5..e645caf 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -206,6 +206,8 @@ public:
virtual qreal minLeftBearing() const { return qreal(); }
virtual qreal minRightBearing() const { return qreal(); }
+ virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
+
virtual const char *name() const = 0;
virtual bool canRender(const QChar *string, int len) = 0;
@@ -374,6 +376,7 @@ public:
virtual void recalcAdvances(QGlyphLayout *, QTextEngine::ShaperFlags) const;
virtual void doKerning(QGlyphLayout *, QTextEngine::ShaperFlags) const;
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags);
+ virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
virtual QFixed ascent() const;
virtual QFixed descent() const;