zplCore.comzplCore.com
class3 members

ZplCaches

public static class ZplCaches

Process-wide caches of the rendering engine (glyph masks, per-typeface metrics, HarfBuzz shapers, compiled property getters). All caches are thread-safe and bounded; ZplCaches.Clear releases them, e.g. after many downloaded (~DU/~DY) fonts were used and dropped.

Properties

PropertyTypeDescription
static GlyphCount { get; }intNumber of glyphs currently cached (approximate).
static MaxGlyphs { get; set; }intMaximum number of rasterised glyphs kept (default 20000, roughly 20–60 MB depending on font sizes). When exceeded the glyph cache is emptied and rebuilt on demand. 0 = unlimited. Lowering the limit below the current ZplCaches.GlyphCount empties the cache at once (not only when the next glyph is added).

Methods

Method SignatureReturnsDescription
static # Clear()voidEmpties all engine caches. Safe to call while other threads render.