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)

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)”
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)

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

Parameters

Name Type
fontIdentity System.UInt64
glyphIndex System.UInt32
textUnitIndex System.Int32
logicalIndex System.Int32
visualIndex System.Int32
clusterStart System.Int32
clusterLength System.Int32
lineIndex System.Int32
wordIndex System.Int32
origin UnityEngine.Vector2
advance System.Single
baseline System.Single
boundsMin UnityEngine.Vector2
boundsMax UnityEngine.Vector2
orientation UnityEngine.Vector2
atlasUvRect UnityEngine.Vector4
atlasPage System.UInt16
distanceFieldScale System.Single
distanceFieldBias System.Single
isVisible System.Boolean
fieldFormat TextStudio.TextStudioGlyphFieldFormat
fieldPixelsPerEm System.Single
fieldSafeDistanceEm System.Single
sourceKind TextStudio.TextStudioVisualSourceKind
atlasToEm UnityEngine.Vector4
localEmSize System.Single
shapingFontIdentity System.UInt64
colorSourceIndex System.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 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