Class FontReference
Font reference that defines the font asset and font size to use.
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
public class FontReference : Object
Constructors
FontReference()
FontReference(Font)
Initializes a new instance of the FontReference struct.
Declaration
public FontReference(Font font)
Parameters
Font
font
The font. |
FontReference(FontAsset, Single)
Initializes a new instance of the FontReference struct.
Declaration
public FontReference(FontAsset font, float size)
Parameters
FontAsset
font
The font. |
System.Single
size
The font size. |
FontReference(FontReference)
Initializes a new instance of the FontReference struct.
Declaration
public FontReference(FontReference other)
Parameters
FontReference
other
The other font reference. |
Properties
Font
The font asset.
Declaration
[EditorOrder(0)]
[Tooltip("The font asset to use as characters source.")]
public FontAsset Font { get; set; }
Property Value
FontAsset
|
Size
The size of the font characters.
Declaration
[EditorOrder(10)]
[Limit(1F, 500F, 0.5F)]
[Tooltip("The size of the font characters.")]
public float Size { get; set; }
Property Value
System.Single
|
Methods
Equals(FontReference)
Determines whether the specified FontReference is equal to this instance.
Declaration
public bool Equals(FontReference other)
Parameters
FontReference
other
The FontReference to compare with this instance. |
Returns
System.Boolean
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
System.Object
other
|
Returns
System.Boolean
|
GetBold()
Gets the bold font object described by the structure.
Declaration
public FontReference GetBold()
Returns
FontReference
The bold font asset. |
GetFont()
Gets the font object described by the structure.
Declaration
public Font GetFont()
Returns
Font
The font or null if descriptor is invalid. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
System.Int32
|
GetItalic()
Gets the italic font object described by the structure.
Declaration
public FontReference GetItalic()
Returns
FontReference
The bold font asset. |
ToString()
Declaration
public override string ToString()
Returns
System.String
|
Operators
Equality(FontReference, FontReference)
Compares two font references.
Declaration
public static bool operator ==(FontReference lhs, FontReference rhs)
Parameters
FontReference
lhs
The left. |
FontReference
rhs
The right. |
Returns
System.Boolean
True if font references are equal, otherwise false. |
Inequality(FontReference, FontReference)
Compares two font references.
Declaration
public static bool operator !=(FontReference lhs, FontReference rhs)
Parameters
FontReference
lhs
The left. |
FontReference
rhs
The right. |
Returns
System.Boolean
True if font references are not equal, otherwise false. |