- Extended by
Base interface that provides information about pixel font metrics.
The following figure illustrates the various metrics of a pixel font:
___ __ __ ___ Ascent | / // / | | ___ ______ /_//_/ __ _ | | | / ____/________ _____ / /_ (_)_________ | | | / / __/ ___/ __ `/ __ \/ __ \/ / ___/ ___/ | | | / /_/ / / / /_/ / /_/ / / / / / /__(__ ) | | |__ \____/_/ \__,_/ .___/_/ /_/_/\___/____/ __| Baseline | Compact / / | |__ /_/ __| Descent Height <== |________| |.......|_|.....| Width Kerning
Height of a font is the maximum glyph height. The
Height is divided into
Descent, i.e. the amount by which glyphs move away from the font
Compact extend is measured from the baseline upwards and includes glyphs of commonly used characters. Each glyph has a
Width (the plain width). Pairs of glyphs can have a
Kerning width, which is used to compute the number of pixels to advance when moving from one glyph to the next.
- See also
Public / Methods
Returns the kerning amount to use when drawing the given character glyph.
In order to move from one character to the next, the kerning width must be subtracted from the PixelFontGlyph.Width of the first character glyph, in order to obtain the final location of the second character glyph.
Public / Attributes
The font ascent (maximum upwards distance from baseline).
The ascent of a font is measured upwards from the baseline to the maximum extend of all character glyphs.
The font descent (maximum downwards distance from baseline).
The descent of a font is measured downwards from the baseline to the maximum extend of all character glyphs.
The maximum font glyph box width.
- See also
Measures the vertical extend of the given character.
Returns the vertical extend of the given string.
Measures the width of the given character.
Measures the width of the given string, applying character kerning.
Returns the amount of padding around the font compact height that is necessary to contain all glyph pixels.
Returns the offset to add to the Y-coordinate of a Anchor.Top anchor in order to render text with uniform padding.