AuthoredFont

AuthoredFont

ภาพรวม

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

แบบอักษรฝังที่ทำให้เป็นมาตรฐานและการแมป CID ที่เปลี่ยนแปลงได้สำหรับข้อความที่สร้างขึ้น.

คลาสนี้ให้ 8 เมธอดสำหรับทำงานกับวัตถุ AuthoredFont ในโปรแกรม Python วิธีการที่มีให้รวมถึง: __init__, cid_to_gid_bytes, cid_widths, embedded_program, encode, encode_glyph, glyph_id, to_unicode_cmap. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้จากแอปพลิเคชัน Python ใดก็ได้หลังจากติดตั้งแพคเกจ Aspose.PDF FOSS สำหรับ Python. คุณสมบัติ: base_name, cid_font_subtype, descriptor_metrics, fingerprint, font_file_key, font_file_subtype, และอีก 3 รายการ.

คุณสมบัติ

ชื่อประเภทการเข้าถึงคำอธิบาย
base_namestrอ่านคืนค่าที่แน่นอนของ PDF BaseFont/FontName ปัจจุบัน.
pdf_base_namestrอ่านนามแฝงสำหรับ :attr:base_name ที่ใช้โดยโค้ดการรวม COS.
is_subsetboolอ่านว่า :meth:embedded_program ปัจจุบันส่งคืนฟอนต์ที่ลดขนาดหรือไม่.
descriptor_metrics`dict[str, intfloattuple[int, int, int, int]]`
shaping_programbytesอ่านส่งคืนโปรแกรม SFNT เต็มรูปแบบที่ใช้โดยเอนจินการจัดรูปแบบ.
fingerprint``อ่านรับลายนิ้วมือ.
cid_font_subtype``อ่านรับค่า cid font subtype.
font_file_key``อ่านรับคีย์ไฟล์แบบอักษร.
font_file_subtype``อ่านรับค่า subtype ของไฟล์ฟอนต์.

วิธีการ

ลายเซ็นคำอธิบาย
`init(sfnt_program: bytes, embedded_program: bytes, plain_base_name: str, kind: str, unicode_to_gid: dict[int, int], metrics: _SfntMetrics, gid_to_native_cid: dict[int, int]None)`
glyph_id(character: str) → `intNone`
encode(text: str) → bytesEncode text เป็น CID สองไบต์และขยายการแมปฟอนต์ปัจจุบัน.
encode_glyph(gid: int, unicode_text: str) → bytesกำหนด CID ให้กับ glyph ที่มีรูปร่างหนึ่งและคลัสเตอร์ Unicode เชิงตรรกะของมัน.
embedded_program() → bytesคืนค่าโปรแกรมฝังตัวปัจจุบัน, ทำ subset เมื่อลดขนาดลง.
to_unicode_cmap() → bytesสร้าง ToUnicode CMap สำหรับการกำหนด CID สองไบต์ปัจจุบัน.
cid_widths() → dict[int, int]ส่งคืนความกว้าง CID -> advance ปัจจุบันในพื้นที่ PDF หน่วย 1000.
cid_to_gid_bytes() → `bytesNone`

ดูเพิ่มเติม

 ภาษาไทย