PDFium Delphi Component Docs

โพรซีเยอร์ ConfigureSystemFontCacheGovernor

Units: PDFium, FPdfCache
ทำให้ผลลัพธ์ system font ระดับโปรเซสอยู่ในงบไบต์แบบใช้ร่วมที่ผู้เรียกเลือก

Syntax

procedure ConfigureSystemFontCacheGovernor(Governor: TPdfCacheGovernor);

Description

เรียกโพรซีเยอร์นี้ตอนที่ยังไม่ได้โหลด PDFium

การเปลี่ยน governor จะล้างผลลัพธ์ system font ที่เก็บไว้และคืน token เดิม

การส่ง nil จะกลับไปจำกัด cache ของ system font ด้วยจำนวน entry อย่างเดียว

หากเรียกโพรซีเยอร์นี้ตอนที่ PDFium โหลดอยู่ จะ raise EPdfError

Lifetime

ผู้เรียกเป็นเจ้าของ governor

governor ต้องมีอายุยาวกว่า cache ของ system font ที่ตั้งค่าไว้

ก่อนปล่อยมัน ให้เรียก 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