Browse Source

Text: improve docs for font ascent(), descent() and lineHeight().

pull/674/head
Vladimír Vondruš 2 years ago
parent
commit
d6fdccac14
  1. 21
      src/Magnum/Text/AbstractFont.h

21
src/Magnum/Text/AbstractFont.h

@ -415,10 +415,10 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
/** /**
* @brief Font ascent in pixels * @brief Font ascent in pixels
* *
* Distance from baseline to top, positive value. Font size is defined * Distance from the baseline to the top, a *positive* value. Font size
* as the distance between @ref ascent() and @ref descent(), thus the * is defined as the distance between @ref ascent() and @ref descent(),
* value of @cpp (ascent - descent)*0.75f @ce (i.e., converted to * thus the value of @cpp (ascent - descent)*0.75f @ce (i.e., converted
* points) is equal to @ref size(). Expects that a font is opened. * to points) is equal to @ref size(). Expects that a font is opened.
* @see @ref lineHeight(), @ref glyphAdvance() * @see @ref lineHeight(), @ref glyphAdvance()
*/ */
Float ascent() const; Float ascent() const;
@ -426,10 +426,11 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
/** /**
* @brief Font descent in pixels * @brief Font descent in pixels
* *
* Distance from baseline to bottom, negative value. Font size is defined * Distance from the baseline to the bottom, a *negative* value. Font
* as the distance between @ref ascent() and @ref descent(), thus the * size is defined as the distance between @ref ascent() and
* value of @cpp (ascent - descent)*0.75f @ce (i.e., converted to * @ref descent(), thus the value of @cpp (ascent - descent)*0.75f @ce
* points) is equal to @ref size(). Expects that a font is opened. * (i.e., converted to points) is equal to @ref size(). Expects that a
* font is opened.
* @see @ref lineHeight(), @ref glyphAdvance() * @see @ref lineHeight(), @ref glyphAdvance()
*/ */
Float descent() const; Float descent() const;
@ -438,8 +439,8 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @brief Line height in pixels * @brief Line height in pixels
* *
* Distance between baselines in consecutive text lines that * Distance between baselines in consecutive text lines that
* corresponds to @ref ascent() and @ref descent(). Expects that a font * corresponds to @ref ascent() and @ref descent(), a *positive* value.
* is opened. * Expects that a font is opened.
* @see @ref size(), @ref glyphAdvance() * @see @ref size(), @ref glyphAdvance()
*/ */
Float lineHeight() const; Float lineHeight() const;

Loading…
Cancel
Save