PDFium Delphi Component Docs

ConfigureSystemFontCacheGovernor procedur

Units: PDFium, FPdfCache
Inkluderar processövergripande systemtypsnittsresultat i en delad bytebudget som anroparen väljer

Syntax

procedure ConfigureSystemFontCacheGovernor(Governor: TPdfCacheGovernor);

Description

Anropa proceduren medan PDFium inte är inläst

Att byta budgethanterare rensar kvarhållna systemtypsnittsresultat och frigör deras gamla tokens

Att skicka nil återställer systemtypsnittscaching med enbart postantal

Att anropa proceduren medan PDFium är inläst kastar EPdfError

Lifetime

Anroparen äger budgethanteraren

Budgethanteraren måste överleva den konfigurerade systemtypsnittscachen

Innan den frigörs, anropa UnloadLibrary och därefter ConfigureSystemFontCacheGovernor(nil)

Example

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;

See Also

FPdfCache, ConfigureSystemFontProvider, LoadLibrary, UnloadLibrary