From ac1e87d9f373ad649d989f254b37d2f29ddf25fe Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 3 Aug 2016 15:45:02 +0300 Subject: Added capHeight() to QRawFont and QFontMetrics(F) Cap height is an important metric of font, in particular it is required to make decent implementation of "initial-letter" CSS property in QtWebKit. Note that some fonts lack cap height metadata, so we need to fall back to measuring H letter height. Change-Id: Icf69d92159d070889085e20d31f2e397d796d940 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontengine_qpf2_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/text/qfontengine_qpf2_p.h') diff --git a/src/gui/text/qfontengine_qpf2_p.h b/src/gui/text/qfontengine_qpf2_p.h index 50aac245c1..e5c38ffbaf 100644 --- a/src/gui/text/qfontengine_qpf2_p.h +++ b/src/gui/text/qfontengine_qpf2_p.h @@ -172,6 +172,7 @@ public: glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE; QFixed ascent() const Q_DECL_OVERRIDE; + QFixed capHeight() const Q_DECL_OVERRIDE; QFixed descent() const Q_DECL_OVERRIDE; QFixed leading() const Q_DECL_OVERRIDE; qreal maxCharWidth() const Q_DECL_OVERRIDE; -- cgit v1.2.3