EotFont
ภาพรวม
EotFont เป็นคลาสใน Aspose.Font FOSS สําหรับ Python. ทายาทจาก: Font.
การติดตั้ง OpenType (EOT) ผนังบนตัวอักษรภายใน TrueType/OpenType.
หมวดนี้ให้ 14 วิธีในการทํางานกับวัตถุ EotFont ในโปรแกรม 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, encoding, eot_version, flags, font_family, font_name,และอีก 9 คน.
คุณสมบัติ
| ชื่อ | ประเภท | Access | คําอธิบาย |
|---|---|---|---|
font_type | FontType | อ่าน | รับประเภทแบบอักษร. |
inner_font | TtfFont | อ่าน | รับแบบอักษรภายใน. |
font_name | str | อ่าน | รับชื่อแบบอักษร. |
font_family | str | อ่าน | รับตระกูลแบบอักษร. |
font_style | str | อ่าน | รับสไตล์ฟอนต์. |
num_glyphs | int | อ่าน | รับค่า num glyphs. |
metrics | FontMetrics | อ่าน | รับเมตริก. |
encoding | FontEncoding | อ่าน | รับค่า encoding. |
glyph_accessor | GlyphAccessor | อ่าน | รับตัวเข้าถึง glyph. |
eot_version | int | อ่าน | รับเวอร์ชัน eot. |
flags | int | อ่าน | รับค่าสถานะ. |
charset | int | อ่าน | รับ charset. |
italic | int | อ่าน | รับค่า italic. |
weight | int | อ่าน | รับค่าน้ำหนัก. |
fs_type | int | อ่าน | รับประเภทของ fs. |
วิธีการ
| Signature | คําอธิบาย |
|---|---|
__init__(inner: TtfFont, eot_version: int, flags: int, charset: int, italic: int, weight: int, fs_type: int) | สร้าง EOT wrapper รอบตัวของ font sfnt ใน. |
get_kern_pairs() → list[KernPair] | กลับคู่เม็ด. |
| `to_bytes(font_type: FontType | None)→bytes` |
font_type() → FontType | ส่งค่าการนับจํานวน FontType ของตัวอักษร EOT นี้กลับ |
font_name() → str | เอกสารที่มีชื่อของตัวอักษร |
font_family() → str | เอกสารที่อยู่ในสตริงชื่อครอบครัวตัวอักษร |
font_style() → str | ส่งกลับตัวอธิบายรูปแบบ (เช่น Regular, Bold) เป็นรุ่นสตรีง |
num_glyphs() → int | เอกสารเก็บจํานวน glyph ของตัวอักษร |
metrics() → FontMetrics | เอกสารที่ถือเป็น FontMetrics ของวัตถุที่มีข้อมูลเมทริกสําหรับตัวอักษร |
encoding() → FontEncoding | เอกสารที่ถือเป็น FontEncoding อัตถุอธิบายการรหัสของตัวอักษร |
glyph_accessor() → GlyphAccessor | เรียก glyph_accessor ในตัวอย่าง EotFont นี้. |
save(path: str) | เขียน EOT แฟนต์ในระบบไฟล์ที่เส้นทางที่กําหนดไว้ |
save_to_format(font_type: FontType, path: str) | เปลี่ยน Font เป็น FontType และบันทึกมันเป็น Path |
convert(target: FontType) → Font | สร้างและคืนวัตถุ Font ใหม่ของเป้าหมายที่ระบุ FontType |