Interface IFontInstance
Represents a font instance, which is a set of glyphs under a specific style (regular, italic, bold etc)
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public interface IFontInstance
Properties
| Improve this Doc View SourceAscender
Gets the ascender
Declaration
short Ascender { get; }
Property Value
Type | Description |
---|---|
Int16 |
Descender
Gets the descender
Declaration
short Descender { get; }
Property Value
Type | Description |
---|---|
Int16 |
Description
Gets the basic descripton of the font instance type.
Declaration
FontDescription Description { get; }
Property Value
Type | Description |
---|---|
FontDescription |
EmSize
Gets the EM size of the font
Declaration
ushort EmSize { get; }
Property Value
Type | Description |
---|---|
UInt16 |
LineGap
Gets the line gap
Declaration
short LineGap { get; }
Property Value
Type | Description |
---|---|
Int16 |
LineHeight
Gets the line height
Declaration
int LineHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceGetGlyph(Int32)
Gets a specific glyph
Declaration
GlyphInstance GetGlyph(int codePoint)
Parameters
Type | Name | Description |
---|---|---|
Int32 | codePoint | the code point to get the glyph from |
Returns
Type | Description |
---|---|
GlyphInstance | The glyph to find. |
GetOffset(GlyphInstance, GlyphInstance)
Get the kerning offset that should be applied between 2 glyphs.
Declaration
Vector2 GetOffset(GlyphInstance glyph, GlyphInstance previousGlyph)
Parameters
Type | Name | Description |
---|---|---|
GlyphInstance | glyph | the new glyph |
GlyphInstance | previousGlyph | the previous glyph in the rendered font |
Returns
Type | Description |
---|---|
Vector2 | Returns the offset that should be offset between the 2 glyphs |