29 #ifndef PT_GFX_FONTMETRICS_H
30 #define PT_GFX_FONTMETRICS_H
32 #include <Pt/Gfx/Api.h>
84 return _ascent + _descent;
133 return _ascent + _descent + _leading;
140 return _underlinePos;
154 return _underlineThickness;
161 _underlineThickness = n;
168 return _strikeoutPos;
182 return _strikeoutThickness;
189 _strikeoutThickness = n;
199 Float _underlineThickness;
201 Float _strikeoutThickness;
Core module.
Definition: pt-gfx-images.dox:14
Float leading() const
Returns the external leading between lines.
Definition: FontMetrics.h:117
Float height() const
Returns the font height (ascent + descent).
Definition: FontMetrics.h:82
Float capHeight() const
Returns the height of capital letters.
Definition: FontMetrics.h:89
void setXHeight(Float n)
Sets the x-height.
Definition: FontMetrics.h:110
void setAscent(Float n)
Sets the ascent.
Definition: FontMetrics.h:61
Float xHeight() const
Returns the height of lowercase x.
Definition: FontMetrics.h:103
Metrics that describe a font face at a given size.
Definition: FontMetrics.h:46
Float underlineThickness() const
Returns the underline thickness.
Definition: FontMetrics.h:152
void setCapHeight(Float n)
Sets the cap height.
Definition: FontMetrics.h:96
Float underlinePos() const
Returns the underline position below the baseline.
Definition: FontMetrics.h:138
Float strikeoutPos() const
Returns the strikeout position above the baseline.
Definition: FontMetrics.h:166
void setStrikeoutThickness(Float n)
Sets the strikeout thickness.
Definition: FontMetrics.h:187
Float descent() const
Returns the descent below the baseline.
Definition: FontMetrics.h:68
void setUnderlineThickness(Float n)
Sets the underline thickness.
Definition: FontMetrics.h:159
void setUnderlinePos(Float n)
Sets the underline position.
Definition: FontMetrics.h:145
void setDescent(Float n)
Sets the descent.
Definition: FontMetrics.h:75
void setLeading(Float n)
Sets the leading.
Definition: FontMetrics.h:124
Float lineHeight() const
Returns the line height (ascent + descent + leading).
Definition: FontMetrics.h:131
FontMetrics()
Constructs empty font metrics.
void setStrikeoutPos(Float n)
Sets the strikeout position.
Definition: FontMetrics.h:173
Float strikeoutThickness() const
Returns the strikeout line thickness.
Definition: FontMetrics.h:180
Float ascent() const
Returns the ascent above the baseline.
Definition: FontMetrics.h:54