CffFont
Overview
CffFont เป็นคลาสใน Aspose.Font FOSS สําหรับ Python. ทายาทจาก: Font.
CffFont.get_kern_pairs() จะส่งรายการของวัตถุ { PLACHEHOLE} ที่แสดงให้เห็นถึงการปรับ kerning ตามที่กําหนดในตัวอักษร.
หมวดนี้ให้ 14 วิธีในการทํางานกับวัตถุ CffFont ในโปรแกรม Python. วิธีการที่ใช้ได้แก่: __init__, convert, encoding, font_family, font_name, font_style, font_type, get_kern_pairs, glyph_accessor, metrics, num_glyphs, save,และวิธีการเพิ่มเติม 2 วิธี. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Python ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Python. คุณสมบัติ: charset, charstrings, encoding, font_family, font_name, font_style,และอีก 9 คน.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
font_type | FontType | Read | ได้รับตัวอักษร. |
font_name | str | Read | ได้ชื่อตัวอักษร. |
font_family | str | Read | ได้รับครอบครัวตัวอักษร. |
font_style | str | Read | ได้รับรูปแบบของตัวอักษร. |
num_glyphs | int | Read | ได้รับการอักษร num. |
metrics | FontMetrics | Read | ได้มาตรฐานแล้ว. |
encoding | `` | Read | ได้รับรหัส. |
glyph_accessor | GlyphAccessor | Read | ได้รับเครื่องมือกลิฟ์. |
top_dict | TopDict | Read | ได้รับคําสั่งสูงสุด. |
private_dict | PrivateDict | Read | ได้คําสั่งส่วนตัว. |
charstrings | CffIndex | Read | ได้รับการชาร์สทริง. |
global_subrs | CffIndex | Read | ได้รับสับบรนด์ทั่วไป. |
local_subrs | CffIndex | Read | ได้รับการตรวจสอบในพื้นที่. |
charset | CffCharset | Read | ได้รับการชาร์เซต. |
string_index | CffIndex | Read | ได้รหัสสตริง. |
Methods
| Signature | Description |
|---|---|
__init__(data: bytes, top_dict: TopDict, private_dict: PrivateDict, charset: CffCharset, encoding: CffEncoding, charstrings: CffIndex, global_subrs: CffIndex, local_subrs: CffIndex, string_index: CffIndex) | Calls init การประกอบการ ในตัวอย่างนี้ CffFont. |
get_kern_pairs() → list[KernPair] | กลับคู่เม็ด. |
| `to_bytes(font_type: FontType | None)→bytes` |
font_type() → FontType | เอกสารที่ให้ FontType ของตัวอักษร CFF |
font_name() → str | การคืน string ชื่อตัวอักษร |
font_family() → str | การคืนชื่อครอบครัวของตัวอักษร |
font_style() → str | การคืนตัวอธิบายรูปแบบ (เช่น Regular, Bold) |
num_glyphs() → int | ส่งจํานวน glyphs ในตัวอักษรกลับ |
metrics() → FontMetrics | กลับวัตถุ FontMetrics ที่มีข้อมูลเมทริกของตัวอักษร |
encoding() → FontEncoding | กลับวัตถุ FontEncoding ที่อธิบายการโคดตัวละครของ fonts |
glyph_accessor() → GlyphAccessor | การคืน GlyphAccessor สําหรับการเข้าถึงข้อมูล glyph แต่ละตัว |
save(path: str) | เขียนตัวอักษรเข้าทางไฟล์ที่กําหนดไว้ |
save_to_format(font_type: FontType, path: str) | เก็บตัวอักษรใน FontType ที่ให้ไว้ที่เส้นทางที่ให้ |
convert(target: FontType) → Font | การคืนวัตถุ Font ใหม่ที่ใช้ในรูปแบบเป้าหมายที่ต้องการ, ทําให้การแปลงรูป แบบในความจําได้ก่อนบันทึก |