THotPDF.ShapedRunCache Property

property ShapedRunCache: THPDFShapedRunCache;

Returns the document-owned LRU cache used to reuse exact producer-side shaping runs and context-bound equal-length text slices

THPDFShapedRunKey identifies a result by stable font content when available, with pointer identity as a compatibility fallback, plus font size, an exact UInt64 feature mask, script, language, paragraph direction, vertical mode, text, and slice boundary context

TryGet performs hashed full-run lookup, while TryGetSlices can assemble a run from cached non-whitespace slices whose left and right boundary contexts match; PutSlices accepts only length-preserving results

Set MaxEntries and MaxBytes to bound memory, call Clear to invalidate all entries, and call Stats to inspect Hits, Misses, SliceHits, SliceMisses, ReusedCodeUnits, SliceEntries, Evictions, Entries, and Bytes

Advanced Text and Streaming Layout