TrueTypeFont
Overview
TrueTypeFont เป็นคลาสใน Aspose.Page FOSS สําหรับ Python.
TrueTypeFont ให้การวัด glyph ระดับต่ํา เช่น ความกว้างล่วงหน้า, ลักษณะแนวตั้ง และจุดประเด็นเพื่อวางแผนข้อความที่แม่นยํา.
หมวดนี้ให้ 12 วิธีในการทํางานกับวัตถุ TrueTypeFont ในโปรแกรม Python. วิธีการที่ใช้ได้แก่: __init__, glyph_advance, glyph_id_for_code, glyph_outline, glyph_sideways_advance, glyph_top_origin_x, glyph_top_origin_y_and_descender, glyph_vertical_advance, glyph_vertical_metrics, glyph_y_max, line_spacing_units, typo_ascender_units. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน Python ใดก็ได้หลังจากติดตั้งแพ็คเกจ FOSS for Python. คุณสมบัติ: units_per_em.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
units_per_em | `` | Read | ได้หน่วยต่อ em. |
Methods
| Signature | Description |
|---|---|
__init__(data: bytes) | |
glyph_id_for_code(code: int) → int | |
glyph_advance(glyph_id: int) → float | |
glyph_vertical_advance(glyph_id: int) → `float | None` |
line_spacing_units() → float | |
typo_ascender_units() → float | |
glyph_top_origin_x(glyph_id: int) → float | |
glyph_top_origin_y_and_descender(glyph_id: int) → tuple[float, float] | |
glyph_sideways_advance(glyph_id: int) → float | |
glyph_vertical_metrics(glyph_id: int) → `tuple[float, float] | None` |
glyph_y_max(glyph_id: int) → `int | None` |
glyph_outline(glyph_id: int) → list[list[GlyphPoint]] |