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

Name Type
index System.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

Name Type
index System.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

Name Type
glyphIndex System.UInt32
field TextStudio.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

Name Type
pixelsPerEm System.Single
distanceRangeEm System.Single
pages UnityEngine.Texture2D[]
glyphs TextStudio.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