Struct FontData | Project Tiny | 0.29.0-preview.22
docs.unity3d.com
    Show / Hide Table of Contents

    Struct FontData

    Runtime data for a font. Includes information about all glyphs present, their locations in the atlas, and their metrics.

    Namespace: Unity.Tiny.Text
    Syntax
    public struct FontData

    Fields

    Atlas

    Information about the texture atlas used for this font.

    Declaration
    public AtlasInfo Atlas
    Field Value
    Type Description
    AtlasInfo

    Face

    Base information about the font face. (Face metrics and such.)

    Declaration
    public FaceInfo Face
    Field Value
    Type Description
    FaceInfo

    GlyphRects

    An array of Glyph atlas rectangles.

    Declaration
    public BlobArray<GlyphRect> GlyphRects
    Field Value
    Type Description
    Unity.Entities.BlobArray<GlyphRect>

    Glyphs

    An array of Glyphs (unicode code points and glyph metrics)

    Declaration
    public BlobArray<GlyphInfo> Glyphs
    Field Value
    Type Description
    Unity.Entities.BlobArray<GlyphInfo>

    Methods

    FindGlyphIndexForCodePoint(UInt32)

    For a given Unicode code point, find the index of the glyph in this font, or -1 if this font doesn't have this glyph.

    Declaration
    public int FindGlyphIndexForCodePoint(uint unicode)
    Parameters
    Type Name Description
    UInt32 unicode

    unicode code point

    Returns
    Type Description
    Int32

    glyph index or -1 if not found

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023