Class FontAsset
Font asset contains glyph collection and cached data used to render text.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class FontAsset : BinaryAsset
Constructors
FontAsset()
Properties
FamilyName
Gets the font family name.
Declaration
[Unmanaged]
public string FamilyName { get; }
Property Value
System.String
|
Options
Gets or sets the font options.
Declaration
[Unmanaged]
public FontOptions Options { get; set; }
Property Value
FontOptions
|
StyleName
Gets the font style name.
Declaration
[Unmanaged]
public string StyleName { get; }
Property Value
System.String
|
Methods
CreateFont(Int32)
Creates the font object of given characters size.
Declaration
[Unmanaged]
public Font CreateFont(int size)
Parameters
System.Int32
size
The font characters size. |
Returns
Font
The created font object. |
Invalidate()
Invalidates all cached dynamic font atlases using this font. Can be used to reload font characters after changing font asset options.
Declaration
[Unmanaged]
public void Invalidate()
Save(String)
Saves this asset to the file. Supported only in Editor.
Declaration
[Unmanaged]
public bool Save(string path = null)
Parameters
System.String
path
The custom asset path to use for the saving. Use empty value to save this asset to its own storage location. Can be used to duplicate asset. Must be specified when saving virtual asset. |
Returns
System.Boolean
True if cannot save data, otherwise false. |