Class FontFamily
Assembly: Ritchie.Toolbox.dll
Syntax
public sealed class FontFamily : IFontFamily
Constructors
FontFamily(Font)
Declaration
public FontFamily(Font regularFont)
Parameters
Type |
Name |
Description |
Font |
regularFont |
|
Methods
Draw(GeometryHelper, Vector2, Color, string, int?, FontWeight, bool)
Declaration
public void Draw(GeometryHelper geometry, Vector2 position, Color color, string text, int? fontSize = null, FontWeight weight = FontWeight.Normal, bool preferItalic = false)
Parameters
Draw(GeometryHelper, Vector2, Color, Rune, int?, FontWeight, bool)
Declaration
public void Draw(GeometryHelper geometry, Vector2 position, Color color, Rune rune, int? fontSize = null, FontWeight weight = FontWeight.Normal, bool preferItalic = false)
Parameters
GetFont(FontWeight, bool)
Declaration
public Font GetFont(FontWeight weight, bool italic)
Parameters
Returns
GetLineHeight(int?, FontWeight, bool)
Declaration
public int GetLineHeight(int? fontSizePixels = null, FontWeight weight = FontWeight.Normal, bool preferItalic = false)
Parameters
Returns
GetUnderlineOffset(int?, FontWeight, bool)
Declaration
public float GetUnderlineOffset(int? fontSize = null, FontWeight weight = FontWeight.Normal, bool preferItalic = false)
Parameters
Returns
Measure(string, int?, FontWeight, bool)
Declaration
public Point Measure(string text, int? fontSize = null, FontWeight weight = FontWeight.Normal, bool preferItalic = false)
Parameters
Returns
SetFont(FontWeight, bool, Font?)
Declaration
public void SetFont(FontWeight weight, bool isItalic, Font? font)
Parameters
Implements