docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FontData

    Inheritance
    object
    FontData
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.UI
    Assembly: UnityEngine.UI.dll
    Syntax
    [Serializable]
    public class FontData : ISerializationCallbackReceiver

    Properties

    alignByGeometry

    Use the extents of glyph geometry to perform horizontal alignment rather than glyph metrics.

    Declaration
    public bool alignByGeometry { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    This can result in better fitting left and right alignment, but may result in incorrect positioning when attempting to overlay multiple fonts (such as a specialized outline font) on top of each other.

    alignment

    How is the text aligned for this generated Text object.

    Declaration
    public TextAnchor alignment { get; set; }
    Property Value
    Type Description
    TextAnchor

    bestFit

    Is best fit used for this generated Text object.

    Declaration
    public bool bestFit { get; set; }
    Property Value
    Type Description
    bool

    defaultFontData

    Get a font data with sensible defaults.

    Declaration
    public static FontData defaultFontData { get; }
    Property Value
    Type Description
    FontData

    font

    The Font to use for this generated Text object.

    Declaration
    public Font font { get; set; }
    Property Value
    Type Description
    Font

    fontSize

    The Font size to use for this generated Text object.

    Declaration
    public int fontSize { get; set; }
    Property Value
    Type Description
    int

    fontStyle

    The font style to use for this generated Text object.

    Declaration
    public FontStyle fontStyle { get; set; }
    Property Value
    Type Description
    FontStyle

    horizontalOverflow

    The horizontal overflow policy for this generated Text object.

    Declaration
    public HorizontalWrapMode horizontalOverflow { get; set; }
    Property Value
    Type Description
    HorizontalWrapMode

    lineSpacing

    The line spaceing for this generated Text object.

    Declaration
    public float lineSpacing { get; set; }
    Property Value
    Type Description
    float

    maxSize

    The max size for this generated Text object.

    Declaration
    public int maxSize { get; set; }
    Property Value
    Type Description
    int

    minSize

    The min size for this generated Text object.

    Declaration
    public int minSize { get; set; }
    Property Value
    Type Description
    int

    richText

    Should rich text be used for this generated Text object.

    Declaration
    public bool richText { get; set; }
    Property Value
    Type Description
    bool

    verticalOverflow

    The vertical overflow policy for this generated Text object.

    Declaration
    public VerticalWrapMode verticalOverflow { get; set; }
    Property Value
    Type Description
    VerticalWrapMode

    Implements

    ISerializationCallbackReceiver
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)