Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TextElement.Glyph

Encapsulates a single glyph rendered inside a TextElement mesh. A glyph is a quad made of four vertices, laid out clockwise: bottom‑left → top‑left → top‑right → bottom‑right
Read time 1 minuteLast updated 12 days ago

Definition

public readonly struct TextElement.Glyph

Remarks

Each Vertex stores:
  • Position – 3‑D coordinates
  • Color – per‑vertex tint
  • UV0 (x,y) – location of the glyph in the atlas texture
  • UV2.x – index of the texture slice inside a texture‑atlas array
  • UV2.y – SDF scale (negative values indicate bold weight)

Fields

Value

Description

kindWhat this glyph represents. See TextElement.GlyphKind.
lineZero-based visual line number on which this glyph is laid out.
linkIDValue of the enclosing
<link=...>
tag, matching _linkID, or
null
when the glyph is not inside a
<link>
tag.
verticesFour vertices that describe the glyph’s quad in BL‑TL‑TR‑BR order.

Properties

Property

Description

textRangeRange of characters (UTF-16 code units) of _parsedText that this glyph renders.