Struct VerticalMetrics
One set of a face's ascent, descent and line gap as stored in a table, in font units with y up.
public readonly record struct VerticalMetrics : IEquatable<VerticalMetrics>
- Implements
- Inherited Members
Examples
// Character map, advance, ink box and kerning, all in font units with y up.
ushort a = face.GetGlyph('A'), v = face.GetGlyph('V');
float advance = face.GetAdvance(a);
GlyphExtents ink = face.GetGlyphExtents(a);
float kern = face.GetKerning(a, v);
FontExtents extents = face.Extents;
// An outline arrives through a sink: lines and quadratics for TrueType, lines and cubics for CFF.
var counter = new SegmentCounter();
face.GetGlyphOutline(a, counter);
Constructors
VerticalMetrics(int, int, int)
One set of a face's ascent, descent and line gap as stored in a table, in font units with y up.
public VerticalMetrics(int Ascent, int Descent, int LineGap)
Parameters
AscentintThe distance above the baseline, usually positive.
DescentintThe distance below the baseline, usually negative.
LineGapintThe extra space between lines.
Examples
// Character map, advance, ink box and kerning, all in font units with y up.
ushort a = face.GetGlyph('A'), v = face.GetGlyph('V');
float advance = face.GetAdvance(a);
GlyphExtents ink = face.GetGlyphExtents(a);
float kern = face.GetKerning(a, v);
FontExtents extents = face.Extents;
// An outline arrives through a sink: lines and quadratics for TrueType, lines and cubics for CFF.
var counter = new SegmentCounter();
face.GetGlyphOutline(a, counter);
Properties
Ascent
The distance above the baseline, usually positive.
public int Ascent { get; init; }
Property Value
Descent
The distance below the baseline, usually negative.
public int Descent { get; init; }
Property Value
LineGap
The extra space between lines.
public int LineGap { get; init; }