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.