FontResourceLimits Class
The limits that bound the work of the font code on untrusted input: the bytes read and kept, the work of decoding a glyph and the glyphs of a shaped text. Exceeding a limit throws a FontResourceLimitException.
public sealed class FontResourceLimitsConstructors
| Name | Description |
|---|---|
| FontResourceLimits() |
FontResourceLimits()
FontResourceLimits.cspublic FontResourceLimits()No documentation is available.
Properties
| Name | Description |
|---|---|
| Default | Gets the default limits. |
| MaxCollectionFaces | Gets the maximum number of faces of a font collection. Each face is read when the collection is loaded. |
| MaxEncodedBytes | Gets the maximum number of bytes read from a font file. |
| MaxFontBytes | Gets the maximum number of bytes a font keeps in memory, after a compressed container is expanded. |
| MaxGlyphComplexity | Gets the maximum number of elementary operations (outline points, components, operators) to produce one glyph. |
| MaxTextGlyphs | Gets the maximum number of glyphs of a shaped text. |
Default
FontResourceLimits.csMaxCollectionFaces
FontResourceLimits.csMaxEncodedBytes
FontResourceLimits.csMaxFontBytes
FontResourceLimits.csMaxGlyphComplexity
FontResourceLimits.csMaxTextGlyphs
FontResourceLimits.csConstants
| Name | Description |
|---|---|
| DefaultMaxCollectionFaces | The default maximum number of faces of a font collection (1,024). |
| DefaultMaxEncodedBytes | The default maximum number of bytes read from a font file (256 MiB). |
| DefaultMaxFontBytes | The default maximum number of bytes a font keeps in memory (256 MiB). |
| DefaultMaxGlyphComplexity | The default maximum number of elementary operations to produce one glyph (1,000,000). |
| DefaultMaxTextGlyphs | The default maximum number of glyphs of a shaped text (1,000,000). |
DefaultMaxCollectionFaces
The default maximum number of faces of a font collection (1,024).
public const int DefaultMaxCollectionFaces = 1024DefaultMaxEncodedBytes
The default maximum number of bytes read from a font file (256 MiB).
public const long DefaultMaxEncodedBytes = 268435456LDefaultMaxFontBytes
The default maximum number of bytes a font keeps in memory (256 MiB).
public const long DefaultMaxFontBytes = 268435456LDefaultMaxGlyphComplexity
The default maximum number of elementary operations to produce one glyph (1,000,000).
public const long DefaultMaxGlyphComplexity = 1000000LDefaultMaxTextGlyphs
The default maximum number of glyphs of a shaped text (1,000,000).
public const long DefaultMaxTextGlyphs = 1000000L