THotPDF.NotEmbeddedFonts Property

 

THotPDF.NotEmbeddedFonts

THotPDF

 

Top  Previous  Next

NotEmbeddedFonts lists the fonts that must not be embedded even when FontEmbedding is enabled.

 

Delphi syntax:

property NotEmbeddedFonts: TStringList;

 

C++ syntax:

__property Classes::TStringList* NotEmbeddedFonts;

 

Description

Use NotEmbeddedFonts to keep specific fonts external while embedding remains enabled for other fonts.

 

This list is useful when a document should embed most fonts for reliability, but a known font must remain external for licensing or workflow reasons.

 

Code Example

HPDF.FontEmbedding := true;                     // Enable font embedding by default
HPDF.NotEmbeddedFonts.Add( 'Arial' );           // Exclude Arial from embedding
HPDF.NotEmbeddedFonts.Add( 'Times New Roman' ); // Exclude Times New Roman from embedding

HPDF.CurrentPage.SetFont( 'Arial', [], 12 );
HPDF.CurrentPage.TextOut( 100, 100, 'Arial will not be embedded' );

HPDF.CurrentPage.SetFont( 'Courier New', [], 12 );
HPDF.CurrentPage.TextOut( 100, 80, 'Courier New will be embedded' );

 

See also: FontEmbedding StandardFontEmulation