THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property THotPDF.FontEmbedding Property

 

THotPDF.FontEmbedding

THotPDF

 

Top  Previous  Next

Determina se il documento PDF incorpora i font usati dal documento.

 

Sintassi Delphi:

property FontEmbedding: Boolean;

 

Sintassi C++:

__property bool FontEmbedding;

 

Descrizione

Un font può essere incorporato nel PDF come dati del programma font. Imposta FontEmbedding a true per incorporare i font e preservare il typeface selezionato sui sistemi dove il font potrebbe non essere installato.

 

For current Unicode and CIDFontType2 output, HotPDF keeps the original glyph IDs for embedded fonts and writes a ToUnicode map together with CIDToGIDMap /Identity. This provides more reliable rendering in strict PDF viewers.

 

Quando incorpora font TrueType, HotPDF legge il nome PostScript del programma font e mantiene /BaseFont, /FontDescriptor /FontName, /FontFamily e i nomi dei font CID discendenti coerenti con i dati del font incorporato. Questo evita problemi di font capture lato viewer quando il nome face Windows richiesto differisce dal nome PostScript interno del font incorporato.

 

Imposta EnableFontSubsetting to true before BeginDoc when the final PDF should embed only the glyphs used by the document.

 

For visual font-fidelity tests, use FontEmbedding = true together with StandardFontEmulation = false. See Tests\Delphi\FontTest for a practical sample.

 

Esempio di codice

HPDF.FontEmbedding := true;                      // Embed selected fonts in the PDF
HPDF.StandardFontEmulation := false;            // Use the actual installed font
HPDF.CurrentPage.SetFont( 'Calibri', [], 12 );
HPDF.CurrentPage.TextOut( 100, 100, 0, 'This text uses embedded Calibri glyphs' );

HPDF.FontEmbedding := false;                    // Disable embedding for following fonts
HPDF.CurrentPage.SetFont( 'Times New Roman', [], 12 );
HPDF.CurrentPage.TextOut( 100, 80, 0, 'This text depends on viewer font availability' );

 

Vedi anche: EnableFontSubsetting, NotEmbeddedFonts, StandardFontEmulation