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.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    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

    Style

    Gets the font style flags.

    Declaration
    [Unmanaged]
    public FontFlags Style { get; }
    Property Value
    FontFlags

    StyleName

    Gets the font style name.

    Declaration
    [Unmanaged]
    public string StyleName { get; }
    Property Value
    System.String

    Methods

    ContainsChar(Char)

    Check if the font contains the glyph of a char.

    Declaration
    [Unmanaged]
    public bool ContainsChar(char c)
    Parameters
    System.Char c

    The char to test.

    Returns
    System.Boolean

    True if the font contains the glyph of the char, otherwise false.

    CreateFont(Single)

    Creates the font object of given characters size.

    Declaration
    [Unmanaged]
    public Font CreateFont(float size)
    Parameters
    System.Single size

    The font characters size.

    Returns
    Font

    The created font object.

    GetBold()

    Gets the font with bold style. Returns itself or creates a new virtual font asset using this font but with bold option enabled.

    Declaration
    [Unmanaged]
    public FontAsset GetBold()
    Returns
    FontAsset

    The virtual font or this.

    GetItalic()

    Gets the font with italic style. Returns itself or creates a new virtual font asset using this font but with italic option enabled.

    Declaration
    [Unmanaged]
    public FontAsset GetItalic()
    Returns
    FontAsset

    The virtual font or this.

    Init(Byte[])

    Initializes the font with a custom font file data.

    Declaration
    [Unmanaged]
    public bool Init(byte[] fontFile)
    Parameters
    System.Byte[] fontFile

    Raw bytes with font file data.

    Returns
    System.Boolean

    True if cannot init, otherwise false.

    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()

    Extension Methods

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