Class Font
A Text Font
Inheritance
System.Object
Font
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Inferno.Graphics.Text
Assembly: Inferno.Desktop.dll
Syntax
public class Font : IDisposable
Fields
| Improve this Doc View SourceCharMap
Declaration
public List<Vector4> CharMap
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<Vector4> |
LineHeight
The amount of pixels between each line of text
Declaration
public int LineHeight
Field Value
Type | Description |
---|---|
System.Int32 |
SpaceSize
The number of pixels for a space character
Declaration
public int SpaceSize
Field Value
Type | Description |
---|---|
System.Int32 |
Texture
This is the texture containing all the glyphs
Declaration
public Texture2D Texture
Field Value
Type | Description |
---|---|
Texture2D |
Methods
| Improve this Doc View SourceCreateFont(String, Int32, Boolean)
Create an Inferno font from a system font
Declaration
[Obsolete("This will be removed once we fully remove FontBuilder from the core engine.")]
public static Font CreateFont(string fontname, int ptSize = 12, bool antialiasing = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | fontname | |
System.Int32 | ptSize | |
System.Boolean | antialiasing |
Returns
Type | Description |
---|---|
Font |
CreateFontFromFile(String, Int32, Boolean)
Create an Inferno font from a font file
Declaration
public static Font CreateFontFromFile(string filename, int ptSize = 12, bool antialiasing = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | |
System.Int32 | ptSize | |
System.Boolean | antialiasing |
Returns
Type | Description |
---|---|
Font |
Dispose()
Declaration
public void Dispose()
FromFontFormat(FontFormat)
Declaration
public static Font FromFontFormat(FontFormat fontFormat)
Parameters
Type | Name | Description |
---|---|---|
FontFormat | fontFormat |
Returns
Type | Description |
---|---|
Font |
MeasureString(String)
Measure how big a string would be in this font
Declaration
public Vector2 MeasureString(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text |
Returns
Type | Description |
---|---|
Vector2 |
Implements
System.IDisposable