THPDFPage.UnicodeTextOut

THPDFPage

 

맨 위  이전  다음

Shows text represented by a Unicode string or buffer.

 

This procedure is retained for backward compatibility and shares the current TextOut font pipeline. Use it when existing code already passes WideString or UTF-16 buffers.

 

Delphi 구문:

procedure UnicodeTextOut( X, Y: Single; Angle: Extended; Text: PWORD; TextLength: Integer ); overload;

procedure UnicodeTextOut( X, Y: Single; Angle: Extended; Text: WideString ); overload;

 

Description:

This procedure prints a text line represented by a Unicode buffer ( Text: PWORD, TextLength: Integer ) or Unicode string ( Text: WideString ) from point X, Y using orientation Angle in degrees.

 

Embedded Unicode font의 경우 HotPDF는 이제 font가 변경될 때 glyph state를 refresh하고 active Windows font에서 glyph ID를 resolve하며 generated PDF에 matching ToUnicode data를 씁니다. 이는 Calibri 같은 embedded font의 cross-viewer rendering을 향상합니다

 

Active font가 먼저 RegisterUnicodeTTF로 loaded된 경우 U+1F600 같은 supplementary-plane Unicode character는 font의 cmap format 12 data를 통해 resolve되고 page text stream에서 하나의 internal CID로 emit됩니다. Page output은 registered Type 0 font resource를 재사용하므로 finalization은 AcroForm Unicode appearance stream에서 사용하는 것과 같은 /CIDToGIDMap, descendant font /W, /ToUnicode, font-subset usage state를 refresh합니다

 

Tests\Delphi\FontTest provides a practical comparison sample for TextOut and embedded font validation.

 

Code Example

HPDF.FontEmbedding := true;
HPDF.StandardFontEmulation := false;
HPDF.CurrentPage.SetFont( 'Arial Unicode MS', [], 12, 0, False );
HPDF.CurrentPage.UnicodeTextOut( 40, 100, 0, WideString('Unicode output sample') );