THPDFPage.UnicodeTextOut

THPDFPage

 

ด้านบน  ก่อนหน้า  ถัดไป

แสดงข้อความที่แสดงแทนด้วยสตริงหรือบัฟเฟอร์ Unicode

 

Delphi syntax:

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 fonts ตอนนี้ HotPDF refresh สถานะ glyph เมื่อ font เปลี่ยน, resolve glyph IDs จาก Windows font ที่ active และเขียนข้อมูล ToUnicode ที่ตรงกันสำหรับ PDF ที่สร้างขึ้น วิธีนี้ช่วยให้ rendering ข้าม viewer ดีขึ้นสำหรับ embedded fonts เช่น Calibri

 

เมื่อ font ที่ active ถูกโหลดด้วย RegisterUnicodeTTF ก่อนแล้ว อักขระ Unicode ใน supplementary-plane เช่น U+1F600 จะถูก resolve ผ่านข้อมูล cmap format 12 ของ font และ emit เป็น internal CID หนึ่งตัวใน page text stream output ของ page ใช้ resource Type 0 font ที่ register ไว้ซ้ำ ดังนั้นขั้นตอน finalization สามารถเขียน /CIDToGIDMap ที่ตรงกับ glyph ได้

 

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