GlyphBudget Struct
Counts the elementary operations spent to produce one glyph (outline points, components, operators), against FontResourceLimits.MaxGlyphComplexity.
public struct GlyphBudgetRemarks
A font is untrusted input: composite glyphs that refer to each other, or subroutines that call each other, can describe an outline whose size is exponential in the size of the file. One counter bounds them all.
Constructors
| Name | Description |
|---|---|
| GlyphBudget(FontResourceLimits) | Initializes a new budget for a glyph. |
GlyphBudget(FontResourceLimits)
GlyphBudget.csInitializes a new budget for a glyph.
public GlyphBudget(FontResourceLimits limits)Parameters
limitsFontResourceLimits- The limits whose
FontResourceLimits.MaxGlyphComplexitybounds the operations.
Methods
| Name | Description |
|---|---|
| Charge(long) | Spends operations. |
Charge(long)
GlyphBudget.csSpends operations.