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/qrawfont.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/text/qrawfont.h') diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h index 5791c6af16..0252e62370 100644 --- a/src/gui/text/qrawfont.h +++ b/src/gui/text/qrawfont.h @@ -118,6 +118,7 @@ public: QFont::HintingPreference hintingPreference() const; qreal ascent() const; + qreal capHeight() const; qreal descent() const; qreal leading() const; qreal xHeight() const; -- cgit v1.2.3