THotPDF.FontEmbedding Property

 

THotPDF.FontEmbedding

THotPDF

 

Üst  Önceki  Sonraki

PDF document öğesinin document tarafından kullanılan fonts öğelerini embed edip etmediğini belirler

 

Delphi söz dizimi:

property FontEmbedding: Boolean;

 

C++ söz dizimi:

__property bool FontEmbedding;

 

Açıklama

Bir font, PDF içine font program data olarak embed edilebilir. Fonts öğelerini embed etmek ve font yüklü olmayabilecek sistemlerde seçilen typeface değerini korumak için FontEmbedding değerini true yapın

 

Geçerli Unicode ve CIDFontType2 output için HotPDF, embedded fonts için original glyph IDs değerlerini korur ve CIDToGIDMap /Identity ile birlikte ToUnicode map yazar. Bu, strict PDF viewers içinde daha güvenilir rendering sağlar

 

TrueType fonts embed edilirken HotPDF, font programının PostScript name değerini okur ve /BaseFont, /FontDescriptor /FontName, /FontFamily ve descendant CID font names değerlerini embedded font data ile tutarlı tutar. Bu, istenen Windows face name embedded font içindeki internal PostScript name değerinden farklı olduğunda viewer-side font capture sorunlarını önler

 

Final PDF yalnızca document tarafından kullanılan glyphs öğelerini embed etmeliyse BeginDoc öncesinde EnableFontSubsetting değerini true yapın

 

Visual font-fidelity tests için FontEmbedding = true değerini StandardFontEmulation = false ile birlikte kullanın. Pratik bir örnek için Tests\Delphi\FontTest öğesine bakın

 

Kod Örneği

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' );

 

Ayrıca bkz.: EnableFontSubsetting,  NotEmbeddedFonts,  StandardFontEmulation