FontSubsetter
FontSubsetter
Panoramica
FontSubsetter è una classe in Aspose.Font FOSS per Python.
FontSubsetter.available_presets() restituisce una tupla di nomi predefiniti che possono essere usati per il sottoinsieme orientato al web.
Questa classe fornisce 11 metodi per lavorare con oggetti FontSubsetter nei programmi Python. I metodi disponibili includono: 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. Tutti i membri pubblici sono accessibili a qualsiasi applicazione Python dopo aver installato il pacchetto Aspose.Font FOSS per Python.
Metodi
| Firma | Descrizione |
|---|---|
available_presets() → tuple[str, ...] | Restituisce una tupla di nomi predefiniti che possono essere usati per il sottoinsieme orientato al web |
subset(font: Font, codepoints: set[int]) → Font | Crea un nuovo Font contenente solo i glifi per i codepoint Unicode forniti |
subset_by_text(font: Font, text: str) → Font | Risolve automaticamente i codepoint richiesti da una stringa e restituisce un Font ridotto |
subset_by_gids(font: Font, gids: set[int]) → Font | Crea un nuovo Font contenente solo i glifi identificati dai glyph IDs forniti |
| `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 | Crea un sottoinsieme per codepoints e restituisce sia il nuovo font sia le diagnostiche di copertura. |
| `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 | Riporta quali punti di codice Unicode richiesti il font può codificare. |
| `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] |