procedure ConfigureSystemFontCacheGovernor(Governor: TPdfCacheGovernor);
Call the procedure whilst PDFium is unloaded
Changing the governor clears retained system-font results and releases their old tokens
Passing nil restores entry-count-only system-font caching
Calling the procedure whilst PDFium is loaded raises EPdfError
The caller owns the governor
The governor must outlive the configured system-font cache
Before freeing it, call UnloadLibrary and then ConfigureSystemFontCacheGovernor(nil)
var
Governor: TPdfCacheGovernor;
begin
Governor := TPdfCacheGovernor.Create(Int64(64) * 1024 * 1024);
try
UnloadLibrary;
ConfigureSystemFontCacheGovernor(Governor);
LoadLibrary;
RunDocumentWork;
UnloadLibrary;
ConfigureSystemFontCacheGovernor(nil);
finally
Governor.Free;
end;
end;