Class Font
A font object, for use by Slate, UMG, and Canvas.
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class Font : UObject
Remarks
A font can either be:
- Runtime cached - The font contains a series of TTF files that combine to form a composite font. The glyphs are cached on demand when required at runtime.
- Offline cached - The font contains a series of textures containing pre-baked cached glyphs and their associated texture coordinates.
Properties
| Improve this Doc View SourceAscent
@todo document
Declaration
public float Ascent { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
CompositeFont
Embedded composite font data
Declaration
public CompositeFont CompositeFont { get; set; }
Property Value
Type | Description |
---|---|
CompositeFont |
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static Font DefaultObject { get; }
Property Value
Type | Description |
---|---|
Font |
Descent
@todo document
Declaration
public float Descent { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
EmScale
Font metrics.
Declaration
public float EmScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
ImportOptions
Options used when importing this font
Declaration
public FontImportOptionsData ImportOptions { get; set; }
Property Value
Type | Description |
---|---|
FontImportOptionsData |
IsRemapped
True if font is 'remapped'.
Declaration
public int IsRemapped { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
That is, the character array is not a direct mapping to unicode values. Instead, all characters are indexed indirectly through the CharRemap array
Kerning
Default horizontal spacing between characters when rendering text with this font
Declaration
public int Kerning { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Leading
@todo document
Declaration
public float Leading { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
LegacyFontName
The default font name to use for legacy Canvas APIs that don't specify a font name
Declaration
public Name LegacyFontName { get; set; }
Property Value
Type | Description |
---|---|
Name |
LegacyFontSize
The default size of the font used for legacy Canvas APIs that don't specify a font size
Declaration
public int LegacyFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumCharacters
Number of characters in the font, not including multiple instances of the same character (for multi-fonts).
Declaration
public int NumCharacters { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This is cached at load-time or creation time, and is never serialized.
ScalingFactor
Scale to apply to the font.
Declaration
public float ScalingFactor { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
Textures
Textures that store this font's glyph image data //NOTE: Do not expose this to the editor as it has nasty crash potential
Declaration
public ObjectArrayField<Texture2D> Textures { get; }
Property Value
Type | Description |
---|---|
ObjectArrayField<Texture2D> |
Methods
| Improve this Doc View SourceNew(UObject, Name)
Spawn an object of this class
Declaration
public static Font New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
Font |
Operators
| Improve this Doc View SourceImplicit(IntPtr to Font)
Convert from IntPtr to UObject
Declaration
public static implicit operator Font(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
Font |