summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-23 13:56:43 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-09-23 13:56:43 +0000
commit90ad487d31effc2845c74f92cf4b101462eaa00d (patch)
treef2456ec839c2f9101f4a986daa676c68f0cfbded /src
parent3ce07c3238b335a7019d8dfabde6bab3f16d342d (diff)
parent53bd8140bb5ee3ce1a9f138b1c862a67b6dd4eaa (diff)
Merge "Merge remote-tracking branch 'origin/5.6.2' into 5.6" into refs/staging/5.6
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qrawfont.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 9e045f91c3..66d16d6068 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -310,6 +310,13 @@ bool QRawFont::operator==(const QRawFont &other) const
/*!
Returns the ascent of this QRawFont in pixel units.
+ The ascent of a font is the distance from the baseline to the
+ highest position characters extend to. In practice, some font
+ designers break this rule, e.g. when they put more than one accent
+ on top of a character, or to accommodate an unusual character in
+ an exotic language, so it is possible (though rare) that this
+ value will be too small.
+
\sa QFontMetricsF::ascent()
*/
qreal QRawFont::ascent() const
@@ -320,6 +327,11 @@ qreal QRawFont::ascent() const
/*!
Returns the descent of this QRawFont in pixel units.
+ The descent is the distance from the base line to the lowest point
+ characters extend to. In practice, some font designers break this rule,
+ e.g. to accommodate an unusual character in an exotic language, so
+ it is possible (though rare) that this value will be too small.
+
\sa QFontMetricsF::descent()
*/
qreal QRawFont::descent() const
@@ -330,6 +342,8 @@ qreal QRawFont::descent() const
/*!
Returns the xHeight of this QRawFont in pixel units.
+ This is often but not always the same as the height of the character 'x'.
+
\sa QFontMetricsF::xHeight()
*/
qreal QRawFont::xHeight() const
@@ -340,6 +354,8 @@ qreal QRawFont::xHeight() const
/*!
Returns the leading of this QRawFont in pixel units.
+ This is the natural inter-line spacing.
+
\sa QFontMetricsF::leading()
*/
qreal QRawFont::leading() const