Skip to content

TextStudioVisualGlyph

StructTextStudioTextStudio
public readonly struct TextStudioVisualGlyph

Renderer-neutral glyph source and its semantic text-unit owner.

TextStudioVisualGlyph(ulong, uint, int, int, int, int, int, int, int, Vector2, float, float, Vector2, Vector2, Vector2, Vector4, ushort, float, float, bool, TextStudioGlyphFieldFormat, float, float, TextStudioVisualSourceKind, Vector4, float, ulong, int, int)

Section titled “TextStudioVisualGlyph(ulong, uint, int, int, int, int, int, int, int, Vector2, float, float, Vector2, Vector2, Vector2, Vector4, ushort, float, float, bool, TextStudioGlyphFieldFormat, float, float, TextStudioVisualSourceKind, Vector4, float, ulong, int, int)”
public TextStudioVisualGlyph(ulong fontIdentity, uint glyphIndex, int textUnitIndex, int logicalIndex, int visualIndex, int clusterStart, int clusterLength, int lineIndex, int wordIndex, Vector2 origin, float advance, float baseline, Vector2 boundsMin, Vector2 boundsMax, Vector2 orientation, Vector4 atlasUvRect, ushort atlasPage, float distanceFieldScale, float distanceFieldBias, bool isVisible, TextStudioGlyphFieldFormat fieldFormat = TextStudioGlyphFieldFormat.SingleDistance, float fieldPixelsPerEm = 0, float fieldSafeDistanceEm = 0, TextStudioVisualSourceKind sourceKind = TextStudioVisualSourceKind.FontGlyph, Vector4 atlasToEm = null, float localEmSize = 0, ulong shapingFontIdentity = 0, int colorSourceIndex = -1, int pageIndex = 0)

Creates a renderer-neutral glyph record with semantic mappings, geometry, atlas and field metadata, normalized orientation, optional color-source linkage, and its layout page.

Parameters

NameType
fontIdentitySystem.UInt64
glyphIndexSystem.UInt32
textUnitIndexSystem.Int32
logicalIndexSystem.Int32
visualIndexSystem.Int32
clusterStartSystem.Int32
clusterLengthSystem.Int32
lineIndexSystem.Int32
wordIndexSystem.Int32
originUnityEngine.Vector2
advanceSystem.Single
baselineSystem.Single
boundsMinUnityEngine.Vector2
boundsMaxUnityEngine.Vector2
orientationUnityEngine.Vector2
atlasUvRectUnityEngine.Vector4
atlasPageSystem.UInt16
distanceFieldScaleSystem.Single
distanceFieldBiasSystem.Single
isVisibleSystem.Boolean
fieldFormatTextStudio.TextStudioGlyphFieldFormat
fieldPixelsPerEmSystem.Single
fieldSafeDistanceEmSystem.Single
sourceKindTextStudio.TextStudioVisualSourceKind
atlasToEmUnityEngine.Vector4
localEmSizeSystem.Single
shapingFontIdentitySystem.UInt64
colorSourceIndexSystem.Int32
pageIndexSystem.Int32

public ulong FontIdentity { get; }

Returns

System.UInt64

public ulong ShapingFontIdentity { get; }

Persistent shaping source identity, separate from the runtime resource identity. Zero means no durable identity was supplied.

Returns

System.UInt64

public uint GlyphIndex { get; }

Returns

System.UInt32

public int TextUnitIndex { get; }

Returns

System.Int32

public int LogicalIndex { get; }

Returns

System.Int32

public int VisualIndex { get; }

Returns

System.Int32

public int ClusterStart { get; }

Returns

System.Int32

public int ClusterLength { get; }

Returns

System.Int32

public int LineIndex { get; }

Returns

System.Int32

public int WordIndex { get; }

Returns

System.Int32

public int PageIndex { get; }

Zero-based page that lays out the glyph under TextMeshPro Page overflow; zero for unpaginated text.

Returns

System.Int32

public Vector2 Origin { get; }

Returns

UnityEngine.Vector2

public float Advance { get; }

Returns

System.Single

public float Baseline { get; }

Returns

System.Single

public Vector2 BoundsMin { get; }

Returns

UnityEngine.Vector2

public Vector2 BoundsMax { get; }

Returns

UnityEngine.Vector2

public Vector2 Orientation { get; }

Returns

UnityEngine.Vector2

public Vector4 AtlasUvRect { get; }

Returns

UnityEngine.Vector4

public ushort AtlasPage { get; }

Returns

System.UInt16

public float DistanceFieldScale { get; }

Returns

System.Single

public float DistanceFieldBias { get; }

Returns

System.Single

public TextStudioGlyphFieldFormat FieldFormat { get; }

Returns

TextStudio.TextStudioGlyphFieldFormat

public float FieldPixelsPerEm { get; }

Returns

System.Single

public float FieldSafeDistanceEm { get; }

Returns

System.Single

public Vector4 AtlasToEm { get; }

Native atlas UV to canonical font em: xy scale, zw offset.

Returns

UnityEngine.Vector4

public float LocalEmSize { get; }

Backend-local size of one em for this actual font glyph, before placement and animation.

Returns

System.Single

public bool IsVisible { get; }

Returns

System.Boolean

public TextStudioVisualSourceKind SourceKind { get; }

Returns

TextStudio.TextStudioVisualSourceKind

public int ColorSourceIndex { get; }

Returns

System.Int32