FontData Class

The bytes of a font file, kept for the lifetime of the fonts created from it and shared by the faces of a collection.

public sealed class FontData

Remarks

The tables are read in place, never copied. The array is an exact garbage-collected array, bounded by FontResourceLimits.MaxFontBytes when it is created: a font is an immutable object without owner or lifetime, so its bytes cannot be rented from a pool.

Properties

NameDescription
BytesGets the bytes of the font, in the sfnt format: a compressed container is expanded.
EnvironmentGets the environment the font was loaded with.
LimitsGets the limits of the environment the font was loaded with: they bound the work of decoding a glyph and the size of a text.
UseEmbeddedBitmapsGets a value indicating whether the bitmaps without colors of the font replace its outlines at the sizes they are made for.

Gets the bytes of the font, in the sfnt format: a compressed container is expanded.

public ReadOnlyMemory<byte> Bytes { get; }

Property value

ReadOnlyMemory<byte>

Environment

FontData.cs

Gets the environment the font was loaded with.

public FontEnvironment Environment { get; }

Property value

FontEnvironment

Gets the limits of the environment the font was loaded with: they bound the work of decoding a glyph and the size of a text.

public FontResourceLimits Limits { get; }

Property value

FontResourceLimits

UseEmbeddedBitmaps

FontData.cs

Gets a value indicating whether the bitmaps without colors of the font replace its outlines at the sizes they are made for.

public bool UseEmbeddedBitmaps { get; }

Property value

bool