THotPDF.FontEmbedding 속성

 

THotPDF.FontEmbedding

THotPDF

 

Top  Previous  Next

PDF 문서에 문서에서 사용하는 폰트를 임베드할지 결정합니다.

 

Delphi syntax:

property FontEmbedding: Boolean;

 

C++ syntax:

__property bool FontEmbedding;

 

Description

폰트는 폰트 프로그램 데이터로 PDF에 임베드할 수 있습니다. 해당 폰트가 설치되어 있지 않을 수 있는 시스템에서도 선택한 서체가 유지되도록 폰트를 임베드하려면 FontEmbedding을 true로 설정합니다.

 

현재의 Unicode 및 CIDFontType2 출력에서 HotPDF는 임베드된 폰트의 원래 글리프 ID를 유지하고, ToUnicode 맵을 CIDToGIDMap /Identity와 함께 기록합니다. 이렇게 하면 엄격한 PDF 뷰어에서 더 안정적으로 렌더링됩니다.

 

TrueType 폰트를 임베드할 때 HotPDF는 폰트 프로그램의 PostScript 이름을 읽어, /BaseFont, /FontDescriptor /FontName, /FontFamily 및 하위 CID 폰트 이름이 임베드된 폰트 데이터와 일치하도록 유지합니다. 요청한 Windows 서체 이름이 임베드된 폰트의 내부 PostScript 이름과 다를 때 뷰어 쪽에서 발생하는 폰트 캡처 문제를 방지합니다.

 

최종 PDF에 문서에서 사용한 글리프만 임베드하려면 BeginDoc 전에 EnableFontSubsetting을 true로 설정합니다.

 

시각적 폰트 충실도 테스트에서는 FontEmbedding = true와 StandardFontEmulation = false를 함께 사용합니다. 실제 예제는 Tests\Delphi\FontTest를 참고하십시오.

 

Code Example

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

 

See also: EnableFontSubsetting,  NotEmbeddedFonts,  StandardFontEmulation