PDFium Delphi Component 文件

ConfigureSystemFontCacheGovernor 程序

單元: PDFium, FPdfCache
將處理序級系統字型結果納入呼叫端自行選擇的共用位元組額度

Syntax

procedure ConfigureSystemFontCacheGovernor(Governor: TPdfCacheGovernor);

Description

請在 PDFium 已卸載的狀態下呼叫此程序

更換治理器會清除保留的系統字型結果,並釋放其原有的權杖

傳入 nil 會還原為僅以項目數計數的系統字型快取

在 PDFium 已載入的狀態下呼叫此程序會引發 EPdfError

生命週期

治理器由呼叫端擁有

治理器的存續時間必須長於所設定的系統字型快取

釋放之前,請先呼叫 UnloadLibrary,再呼叫 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