SetFontCacheLimit
Text, fonts, performance
Description
Sets the maximum tracked bytes retained by the shared font-face, shaped-run and parsed glyph-outline caches
Syntax
Delphi
Function TPDFlib.SetFontCacheLimit(MaxBytes: Int64): Integer;Parameters
| MaxBytes | The cache budget in bytes; 0 disables retention while still allowing each operation to use transient resources |
|---|
Return values
Returns 1 when the limit is accepted or 0 for a negative value, which leaves the previous limit unchanged
Remarks
The default limit is 32 MiB and lowering it immediately evicts least-recently-used entries until the tracked total fits
Parsed font programs, font-face resources and deep-copied shaped runs share one budget so a workload cannot bypass the limit by switching cache category