Skip to content

WritingFontAsset

ClassTextStudioTextStudio
public sealed class WritingFontAsset : ScriptableObject

Font-specific authored centerlines and prepared contours keyed by glyph variation.

public const int CurrentSchemaVersion = 1

Returns

System.Int32

public TextStudioWritingGlyphRecord GetGlyph(int index)

Returns an independent copy of a glyph record, including its authored stroke and knot data.

Parameters

Name Type
index System.Int32

Returns

TextStudio.TextStudioWritingGlyphRecord

SetGlyphs(float, TextStudioWritingGlyphRecord[])

Section titled “SetGlyphs(float, TextStudioWritingGlyphRecord[])”
public void SetGlyphs(float unitsPerEm, TextStudioWritingGlyphRecord[] glyphs)

Replaces glyph records with independent copies, clamps units per em to at least one, repairs stroke identities, and advances the asset revision.

Parameters

Name Type
unitsPerEm System.Single
glyphs TextStudio.TextStudioWritingGlyphRecord[]

public WritingFontAsset()

public int SchemaVersion { get; }

Returns

System.Int32

public int Revision { get; }

Returns

System.Int32

public float UnitsPerEm { get; }

Returns

System.Single

public int GlyphCount { get; }

Returns

System.Int32