TrueTypeFont
Overview
TrueTypeFont là một lớp trong Aspose.Page FOSS cho Python.
TrueTypeFont cung cấp các định lượng glyph thấp như chiều rộng tiến, chiều cao dọc và điểm xuất ra để sắp xếp văn bản chính xác.
Khóa học này cung cấp 12 phương pháp để làm việc với các đối tượng TrueTypeFont trong các chương trình Python. Các phương pháp có sẵn bao gồm: __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. Tất cả các thành viên công cộng đều có thể truy cập bất kỳ ứng dụng Python nào sau khi cài đặt Aspose.Page FOSS cho gói Python. Tài sản : units_per_em.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
units_per_em | `` | Read | Đặt các đơn vị cho 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]] |