Skip to content

TextStudioPreparedFieldTier

ClassTextStudioTextStudio
public sealed class TextStudioPreparedFieldTier

Density and the full signed-distance decode interval are independent, explicit quantities.

public Texture2D GetPage(int index)

Returns the field atlas texture at the supplied page index.

Parameters

NameType
indexSystem.Int32

Returns

UnityEngine.Texture2D

public TextStudioPreparedGlyphField GetGlyph(int index)

Returns the prepared glyph placement at the supplied index in the glyph-ID-sorted array.

Parameters

NameType
indexSystem.Int32

Returns

TextStudio.TextStudioPreparedGlyphField

TryGetGlyph(uint, out TextStudioPreparedGlyphField)

Section titled “TryGetGlyph(uint, out TextStudioPreparedGlyphField)”
public bool TryGetGlyph(uint glyphIndex, out TextStudioPreparedGlyphField field)

Attempts to find a prepared field placement by shaped glyph identifier using the sorted glyph table.

Parameters

NameType
glyphIndexSystem.UInt32
fieldTextStudio.TextStudioPreparedGlyphField

Returns

System.Boolean

TextStudioPreparedFieldTier(float, float, Texture2D[], TextStudioPreparedGlyphField[])

Section titled “TextStudioPreparedFieldTier(float, float, Texture2D[], TextStudioPreparedGlyphField[])”
public TextStudioPreparedFieldTier(float pixelsPerEm, float distanceRangeEm, Texture2D[] pages, TextStudioPreparedGlyphField[] glyphs)

Creates a field tier with the supplied density and distance interval, copied page and glyph arrays, and glyphs sorted by identifier.

Parameters

NameType
pixelsPerEmSystem.Single
distanceRangeEmSystem.Single
pagesUnityEngine.Texture2D[]
glyphsTextStudio.TextStudioPreparedGlyphField[]

public float PixelsPerEm { get; }

Returns

System.Single

public float DistanceRangeEm { get; }

Returns

System.Single

public float SafeDistanceEm { get; }

Returns

System.Single

public int PageCount { get; }

Returns

System.Int32

public int GlyphCount { get; }

Returns

System.Int32

public long TextureBytes { get; }

Returns

System.Int64