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 |
---|---|
BlobArray<GlyphRect> |
Glyphs
An array of Glyphs (unicode code points and glyph metrics)
Declaration
public BlobArray<GlyphInfo> Glyphs
Field Value
Type | Description |
---|---|
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 |