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, whilst TryGetSlices can assemble a run from cached non-whitespace slices whose left and right boundary contexts match; PutSlices accepts only length-preserving results

Cache-key hashing explicitly preserves 32-bit modular multiplication when range and overflow checks are enabled, including FPC 3.3.1 Win32 and Win64 builds

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