EmbeddedFont

EmbeddedFont

ภาพรวม

EmbeddedFont เป็นคลาสใน Aspose.PDF FOSS สำหรับ TypeScript.

ตัวจัดการแบบไม่โปร่งใสสำหรับโปรแกรมฟอนท์ที่ลงทะเบียนกับ {@link Document.AddFont}.

คลาสนี้ประกาศ 7 เมธอดสำหรับอ็อบเจ็กต์ EmbeddedFont ในโปรแกรม TypeScript. เมธอดที่มีให้รวมถึง: constructor, driver, encode, measure, measureShaped, probe, shapeRuns. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้จากแอปพลิเคชัน TypeScript ใด ๆ หลังจากติดตั้งแพ็กเกจ Aspose.PDF FOSS สำหรับ TypeScript. คุณสมบัติ: objNum, sfnt, shape, toUnicode, usedGids.

คุณสมบัติ

ชื่อประเภทการเข้าถึงคำอธิบาย
sfnt: SfntFontอ่าน@internal โปรแกรมแบบอักษรที่แยกวิเคราะห์แล้ว.
usedGids``อ่าน@internal GID ดั้งเดิม (= CID) ที่วาดด้วยแบบอักษรนี้, ทั่วทุกหน้า.
objNum`: numberundefined`อ่าน/เขียน
shape``อ่าน/เขียน@internal ธงการจัดรูปแบบเริ่มต้น, จาก {@link Document.AddFont}({ shape }).
toUnicode``อ่าน@internal gid → ข้อความต้นฉบับ, สำหรับ /ToUnicode ของ shaped/ligated/RTL glyphs.

วิธีการ

ลายเซ็นคำอธิบาย
constructor(sfnt: SfntFont)@internal สร้างผ่าน {@link Document.AddFont}.
measure(text: string, fontSize: number) → number@internal ความกว้างของ text ในหน่วย points ที่ fontSize; chars absent from the font’s cmap are dropped (no recording).
encode(text: string) → Uint8Array@internal Encode text to 2-byte Identity-H glyph codes (CID = original GID), recording each used GID for subsetting.
probe(text: string) → number@internal Count of cmappable chars in text, without recording glyphs.
driver() → FontDriver@internal A {@link FontDriver} view for the layout/stamping engine.
shapeRuns(text: string, opts: ShapeOpts) → ShapedRun[]@internal Shape text into visual runs, recording used gids and, for each final gid, the source code points of its cluster (for /ToUnicode).
measureShaped(text: string, fontSize: number, opts: ShapeOpts) → number@internal ความกว้างที่กำหนดของ text หน่วยจุดที่ fontSize.
 ภาษาไทย