Skip to content

TextStudioBackendShapedFontFace

StructTextStudioTextStudio
public readonly struct TextStudioBackendShapedFontFace

Transient description of a shaped font face, including metrics and a bounded view of backend-owned font bytes.

public byte[] GetFontBytesSnapshot()

Returns a detached caller-owned copy of the font data.

Returns

System.Byte[]

TextStudioBackendShapedFontFace(int, string, byte[], bool, int, float, float, float, float, float)

Section titled “TextStudioBackendShapedFontFace(int, string, byte[], bool, int, float, float, float, float, float)”
public TextStudioBackendShapedFontFace(int fontId, string displayName, byte[] fontBytes, bool isColorFont, int unitsPerEm, float ascent, float underlineOffset, float underlineThickness, float strikethroughOffset, float strikethroughThickness)

Creates shaped-font metadata for one backend font identifier.

Parameters

Name Type
fontId System.Int32
displayName System.String
fontBytes System.Byte[]
isColorFont System.Boolean
unitsPerEm System.Int32
ascent System.Single
underlineOffset System.Single
underlineThickness System.Single
strikethroughOffset System.Single
strikethroughThickness System.Single

public int FontId { get; }

Returns

System.Int32

public string DisplayName { get; }

Returns

System.String

public TextStudioReadOnlyBuffer<byte> FontData { get; }

Transient read-only view over backend-owned font data. The view remains valid until the backend’s TextStudio.ITextStudioShapedGlyphBackend.ShapedGlyphRevision changes.

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Byte}

public int FontByteCount { get; }

Number of bytes in TextStudio.TextStudioBackendShapedFontFace.FontData.

Returns

System.Int32

public bool IsColorFont { get; }

Returns

System.Boolean

public int UnitsPerEm { get; }

Returns

System.Int32

public float Ascent { get; }

Returns

System.Single

public float UnderlineOffset { get; }

Returns

System.Single

public float UnderlineThickness { get; }

Returns

System.Single

public float StrikethroughOffset { get; }

Returns

System.Single

public float StrikethroughThickness { get; }

Returns

System.Single

public bool IsValid { get; }

Returns

System.Boolean