Class Metrics
The font metrics.
Namespace: Evergine.Framework.Assets.AssetParts.Fonts
Assembly: Evergine.Framework.dll
Syntax
public class Metrics
Properties
ascender
Gets or sets the ascender.
Declaration
public float ascender { get; set; }
Property Value
Type | Description |
---|---|
float |
descender
Gets or sets the descender.
Declaration
public float descender { get; set; }
Property Value
Type | Description |
---|---|
float |
emSize
Gets or sets the emSize. Default value is 1. Multiply by 0.75 to convert to pixels.
Declaration
public int emSize { get; set; }
Property Value
Type | Description |
---|---|
int |
lineHeight
Gets or sets the font line height.
Declaration
public float lineHeight { get; set; }
Property Value
Type | Description |
---|---|
float |
underlineThickness
Gets or sets the underline thickness.
Declaration
public float underlineThickness { get; set; }
Property Value
Type | Description |
---|---|
float |
underlineY
Gets or sets the underline Y coordinate.
Declaration
public float underlineY { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
Read(BinaryReader)
Reads metrics data from a binary file.
Declaration
public static Metrics Read(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
Metrics | The read metrics object. |
Write(BinaryWriter)
Writes metrics data into a binary file.
Declaration
public void Write(BinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
BinaryWriter | writer | The binary writer. |