FontSubsetter
Opinie generală
FontSubsetter este o clasă în Aspose.Font FOSS pentru Python.
FontSubsetter.available_presets() returnă o cuplu de nume preset care pot fi utilizate pentru subsetarea orientată spre web.
Această clasă oferă 11 metode pentru a lucra cu obiecte FontSubsetter în programele Python. Metodele disponibile includ: 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. Toți membrii publicului sunt accesibili oricărei aplicații Python după instalarea pachetului FOSS pentru Python.
Metode de evaluare
| Signature | Descriere: |
|---|---|
available_presets() → tuple[str, ...] | Întoarce o cuplu de nume predefinite care pot fi utilizate pentru subsetarea orientată spre web. |
subset(font: Font, codepoints: set[int]) → Font | Creează un nou font care conține numai glifele pentru punctele de cod Unicode furnizate. |
subset_by_text(font: Font, text: str) → Font | Răspunde automat la codurile necesare dintr-un șir și returnează un font redus. |
subset_by_gids(font: Font, gids: set[int]) → Font | Creează un nou font care conține numai glifele identificate de ID-urile date ale glifelor. |
| `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 | Subset de coduri și returnat atât noul tip de scris, cât și diagnosticarea acoperirii. |
| `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 | Raport care a solicitat coduri Unicode puncte fontul poate codifica. |
| `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] |