program FontEmbeddingExample;

{$APPTYPE CONSOLE}

uses

SysUtils, Graphics, Classes, HPDFDoc;

 

var

  HPDF: THotPDF;

 

begin

HPDF:= THotPDF.Create( nil );

try

HPDF.AutoLaunch := true; // سيتم عرض ملف PDF تلقائيًا

   HPDF.FileName := 'FontEmbeddingExample.pdf';            

HPDF.FontEmbedding := true; // سيتم دمج الخطوط

HPDF.StandardFontEmulation := false; // استخدام مقاييس الخط الفعلية المثبتة

HPDF.BeginDoc; // إنشاء ملف PDF

HPDF.CurrentPage.SetFont( 'Calibri', [], 12 ); // تحديد الخط المستهدف

HPDF.CurrentPage.TextOut(10, 10, 0, 'Embedded font output sample'); // طباعة النص

HPDF.EndDoc; // إغلاق ملف PDF

finally

     HPDF.Free;

end;

end.