Interface IGlyphTypeface
[Unstable]
public interface IGlyphTypeface : IDisposable
- Inherited Members
Properties
FamilyName
Gets the family name for the IGlyphTypeface object.
string FamilyName { get; }
Property Value
FontSimulations
Gets the algorithmic style simulations applied to this glyph typeface.
FontSimulations FontSimulations { get; }
Property Value
GlyphCount
Gets the number of glyphs held by this glyph typeface.
int GlyphCount { get; }
Property Value
Metrics
Gets the font metrics.
FontMetrics Metrics { get; }
Property Value
- FontMetrics
The font metrics.
Stretch
Gets the FontStretch value for the IGlyphTypeface object.
FontStretch Stretch { get; }
Property Value
Style
Gets the style for the IGlyphTypeface object.
FontStyle Style { get; }
Property Value
Weight
Gets the designed weight of the font represented by the IGlyphTypeface object.
FontWeight Weight { get; }
Property Value
Methods
GetGlyph(uint)
Returns an glyph index for the specified codepoint.
ushort GetGlyph(uint codepoint)
Parameters
codepoint
uintThe codepoint.
Returns
- ushort
A glyph index.
Remarks
Returns 0
if a glyph isn't found.
GetGlyphAdvance(ushort)
Returns the glyph advance for the specified glyph.
int GetGlyphAdvance(ushort glyph)
Parameters
glyph
ushortThe glyph.
Returns
- int
The advance.
GetGlyphAdvances(ReadOnlySpan<ushort>)
Returns an array of glyph advances in design em size.
int[] GetGlyphAdvances(ReadOnlySpan<ushort> glyphs)
Parameters
glyphs
ReadOnlySpan<ushort>The glyph indices.
Returns
- int[]
An array of glyph advances.
GetGlyphs(ReadOnlySpan<uint>)
Returns an array of glyph indices. Codepoints that are not represented by the font are returned as
0
.
ushort[] GetGlyphs(ReadOnlySpan<uint> codepoints)
Parameters
codepoints
ReadOnlySpan<uint>The codepoints to map.
Returns
- ushort[]
An array of glyph indices.
TryGetGlyph(uint, out ushort)
Tries to get an glyph index for specified codepoint.
bool TryGetGlyph(uint codepoint, out ushort glyph)
Parameters
Returns
- bool
true
if an glyph index was found,false
otherwise.
TryGetGlyphMetrics(ushort, out GlyphMetrics)
Tries to get a glyph's metrics in em units.
bool TryGetGlyphMetrics(ushort glyph, out GlyphMetrics metrics)
Parameters
glyph
ushortThe glyph id.
metrics
GlyphMetricsThe glyph metrics.
Returns
- bool
true
if an glyph's metrics was found,false
otherwise.
TryGetTable(uint, out byte[])
Returns the contents of the table data for the specified tag.
bool TryGetTable(uint tag, out byte[] table)
Parameters
tag
uintThe table tag to get the data for.
table
byte[]The contents of the table data for the specified tag.
Returns
- bool
Returns
true
if the content exists, otherwisefalse
.