FontSubsetter
Overview
FontSubsetter là một lớp trong Aspose.Font FOSS cho Python.
FontSubsetter.available_presets() trả về một loạt các tên đặt trước có thể được sử dụng cho việc đăng ký dựa trên web.
Khóa học này cung cấp 11 phương pháp để làm việc với các đối tượng FontSubsetter trong các chương trình Python. Các phương pháp có sẵn bao gồm: analyze_coverage, analyze_web_coverage, available_presets, resolve_codepoints, subset, subset_by_gids, subset_by_presets, subset_by_text, subset_for_web, subset_for_web_with_coverage, subset_with_coverage. 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.Font FOSS cho gói Python.
Methods
| Signature | Description |
|---|---|
available_presets() → tuple[str, ...] | Trả lại một số tên đặt trước có thể được sử dụng cho các cài đặt theo định hướng web |
subset(font: Font, codepoints: set[int]) → Font | Tạo một Font mới chỉ chứa glyphs cho các codepoints Unicode được cung cấp |
subset_by_text(font: Font, text: str) → Font | Tự động giải quyết các điểm mã cần thiết từ một dòng và trả về một Font giảm |
subset_by_gids(font: Font, gids: set[int]) → Font | Tạo một Font mới chỉ chứa glyphs được xác định bởi các ID glyf đã cung cấp |
| `subset_by_presets(font: Font, presets: str | Iterable[str])→Font` |
| `subset_for_web(font: Font, presets: str | Iterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int] |
subset_with_coverage(font: Font, codepoints: set[int]) → SubsetResult | Nhập mã điểm và trả về cả hai phông chữ mới và chẩn đoán bao phủ. |
| `subset_for_web_with_coverage(font: Font, presets: str | Iterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int] |
analyze_coverage(font: Font, codepoints: Iterable[int], groups: Iterable[CoverageGroup]) → SubsetCoverage | Báo cáo yêu cầu Unicode codepoints font có thể mã hóa. |
| `analyze_web_coverage(font: Font, presets: str | Iterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int] |
| `resolve_codepoints(presets: str | Iterable[str], text: str, codepoints: Iterable[int], ranges: Iterable[tuple[int, int] |