Search Results for

    Show / Hide Table of Contents

    Class FontAsset

    Font asset contains glyph collection and cached data used to render text.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    FontAsset
    Inherited Members
    BinaryAsset.Reimport()
    BinaryAsset.ImportPath
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Object.__unmanagedPtr
    Object.__internalId
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.New<T>()
    Object.New(Type)
    Object.Find<T>(Guid)
    Object.Find(Guid, Type)
    Object.TryFind<T>(Guid)
    Object.Destroy(Object, Single)
    Object.Destroy<T>(T, Single)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    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()

    Initializes a new instance of the FontAsset.

    Declaration
    public 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.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2021 Wojciech Figat