TextStudioBackendShapedFontFace
public readonly struct TextStudioBackendShapedFontFaceTransient description of a shaped font face, including metrics and a bounded view of backend-owned font bytes.
Methods
Section titled “Methods”
GetFontBytesSnapshot()
Section titled “GetFontBytesSnapshot()”public byte[] GetFontBytesSnapshot()Returns a detached caller-owned copy of the font data.
Returns
System.Byte[]
Constructors
Section titled “Constructors”
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 |
Properties
Section titled “Properties”
FontId
Section titled “FontId”public int FontId { get; }Returns
System.Int32
DisplayName
Section titled “DisplayName”public string DisplayName { get; }Returns
System.String
FontData
Section titled “FontData”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}
FontByteCount
Section titled “FontByteCount”public int FontByteCount { get; }Number of bytes in TextStudio.TextStudioBackendShapedFontFace.FontData.
Returns
System.Int32
IsColorFont
Section titled “IsColorFont”public bool IsColorFont { get; }Returns
System.Boolean
UnitsPerEm
Section titled “UnitsPerEm”public int UnitsPerEm { get; }Returns
System.Int32
Ascent
Section titled “Ascent”public float Ascent { get; }Returns
System.Single
UnderlineOffset
Section titled “UnderlineOffset”public float UnderlineOffset { get; }Returns
System.Single
UnderlineThickness
Section titled “UnderlineThickness”public float UnderlineThickness { get; }Returns
System.Single
StrikethroughOffset
Section titled “StrikethroughOffset”public float StrikethroughOffset { get; }Returns
System.Single
StrikethroughThickness
Section titled “StrikethroughThickness”public float StrikethroughThickness { get; }Returns
System.Single
IsValid
Section titled “IsValid”public bool IsValid { get; }Returns
System.Boolean