NameTable
Vue de l’ensemble
‘NameTable’ est une classe dans Aspose.Font FOSS pour Python.
NameTable.language_key retourne une ligne de tag linguistique pour le platforme_id et le langage_ID donné.
Cette classe fournit 11 méthodes pour travailler avec les objets NameTable dans les programmes Python. Les méthodologies disponibles comprennent: best_name, ensure_english_platform_names , enseure-name_record ; from_reader; ‘get : langue_key . localized_names. records_for., remove_ name_ids.. tous les membres publics sont accessibles à n’importe quelle application Pythone après l’installation de l’Aspose.Font FOSS pour le package PyThone. Propriétés : records
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
records | list[NameRecord] | Read/Write | Gets or sets the records. |
méthodes
| Signature | Description |
|---|---|
language_key(platform_id: int, language_id: int) → str | Returns a language tag string for the given platform_id and language_id |
get(name_id: int, platform_id: int, encoding_id: int) → `str | None` |
records_for(name_id: int) → list[NameRecord] | Returns a list of NameRecord objects that have the given name_id |
localized_names(name_id: int) → dict[str, str] | Returns a dict mapping language tags to name strings for the given name_id |
best_name(name_id: int, preferred_languages: tuple[str, ...]) → `str | None` |
replace_name(name_id: int, value: str) | Overwrites all records of the given name_id with the supplied value |
ensure_name_record(name_id: int, value: str, platform_id: int, encoding_id: int, language_id: int) | Creates or updates a name record with the specified IDs and value |
ensure_english_platform_names(name_id: int, value: str) | Guarantees English platform records for name_id with the given value |
remove_name_ids(name_ids: Iterable[int]) | Deletes all name records whose name_id appears in the provided iterable |
from_reader(r: BinaryReader, table_length: int) → "NameTable" | Reads a NameTable from a BinaryReader using the given table_length |
to_bytes() → bytes | Serializes the NameTable into its binary representation |
Voir aussi
- Aspose.Font — référence API d’entreprise