CffFont
CffFont
Overzicht
CffFont is een klasse in Aspose.Font FOSS voor Python. Erft van: Font.
CffFont.get_kern_pairs() retourneert een lijst van KernPair objecten die de kerningaanpassingen weergeven die in het lettertype zijn gedefinieerd.
Deze klasse biedt 14 methoden voor het werken met CffFont objecten in Python programma’s. Beschikbare methoden zijn: __init__, convert, encoding, font_family, font_name, font_style, font_type, get_kern_pairs, glyph_accessor, metrics, num_glyphs, save, en 2 extra methoden. Alle openbare leden zijn toegankelijk voor elke Python applicatie na het installeren van het Aspose.Font FOSS voor Python pakket. Eigenschappen: charset, charstrings, encoding, font_family, font_name, font_style, en nog 9.
Eigenschappen
| Naam | Type | Toegang | Beschrijving |
|---|---|---|---|
font_type | FontType | Lezen | Haalt het lettertype op. |
font_name | str | Lezen | Haalt de lettertype-naam op. |
font_family | str | Lezen | Haalt de lettertypefamilie op. |
font_style | str | Lezen | Haalt de lettertype-stijl op. |
num_glyphs | int | Lezen | Haalt het aantal glyphs op. |
metrics | FontMetrics | Lezen | Haalt de metriek op. |
encoding | `` | Lezen | Haalt de codering op. |
glyph_accessor | GlyphAccessor | Lezen | Haalt de glyph accessor op. |
top_dict | TopDict | Lezen | Haalt de top dict op. |
private_dict | PrivateDict | Lezen | Haalt de private dict op. |
charstrings | CffIndex | Lezen | Haalt de charstrings op. |
global_subrs | CffIndex | Lezen | Haalt de globale subrs op. |
local_subrs | CffIndex | Lezen | Haalt de lokale subrs op. |
charset | CffCharset | Lezen | Haalt de tekenset op. |
string_index | CffIndex | Lezen | Haalt de tekenreeks-index op. |
Methoden
| Handtekening | Beschrijving |
|---|---|
__init__(data: bytes, top_dict: TopDict, private_dict: PrivateDict, charset: CffCharset, encoding: CffEncoding, charstrings: CffIndex, global_subrs: CffIndex, local_subrs: CffIndex, string_index: CffIndex) | Calls init op deze CffFont instantie. |
get_kern_pairs() → list[KernPair] | Retourneert de kernparen. |
| `to_bytes(font_type: FontType | None)→bytes` |
font_type() → FontType | Eigenschap levert de FontType van het CFF-lettertype. |
font_name() → str | Retourneert de naamreeks van het lettertype. |
font_family() → str | Retourneert de familienaam van het lettertype |
font_style() → str | Retourneert de stijlbeschrijving (bijv., Regular, Bold) |
num_glyphs() → int | Retourneert het totale aantal glyphs in het lettertype |
metrics() → FontMetrics | Retourneert een FontMetrics object dat de metrische gegevens van het lettertype bevat |
encoding() → FontEncoding | Retourneert een FontEncoding object dat de tekencodering van het lettertype beschrijft |
glyph_accessor() → GlyphAccessor | Retourneert een GlyphAccessor voor het benaderen van individuele glyph-gegevens |
save(path: str) | Schrijft het lettertype naar het opgegeven bestandssysteempad |
save_to_format(font_type: FontType, path: str) | Slaat het lettertype op in de opgegeven FontType naar het opgegeven pad |
convert(target: FontType) → Font | Retourneert een nieuw Font‑object dat is aangemaakt in het aangevraagde doelformaat, waardoor in‑memory‑formaatconversie vóór het opslaan mogelijk is |