VariableInstance
Overview
VariableInstance is a class in Aspose.Font FOSS for Python.
VariableInstance.css_variation_settings(axes) produces a tuple of CSS font-variation-settings strings for the given collection of axes.
This class provides 9 methods for working with VariableInstance objects in Python programs.
Available methods include: css_variation_settings, format_coordinates, language_profiles, localization_coverage, localization_resolution, localized_labels, name, requested_language_hints, to_presentation.
All public members are accessible to any Python application after installing the Aspose.Font FOSS for Python package.
Properties: available_languages, coordinates, label, name_id, names_by_language, postscript_name, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
available_languages | tuple[str, ...] | Read | Gets the available languages. |
label | str | Read | Gets the label. |
coordinates | dict[str, float] | Read/Write | Gets or sets the coordinates. |
name_id | int | Read/Write | Gets or sets the name id. |
postscript_name_id | int | None | Read/Write | Gets or sets the postscript name id. |
names_by_language | dict[str, str] | Read/Write | Gets or sets the names by language. |
postscript_name | str | None | Read/Write | Gets or sets the postscript name. |
Methods
| Signature | Description |
|---|---|
name(language: str | tuple[str, ...]) → str | None | Returns the instance name for the specified language or language tuple, or None if unavailable |
localization_resolution(language: str | tuple[str, ...]) → LocalizationResolution | Returns a LocalizationResolution describing name resolution for the given language(s) |
localization_coverage(language: str | tuple[str, ...]) → LocalizationCoverage | Returns a LocalizationCoverage indicating which languages have name data for the given language(s) |
localized_labels(preferred_languages: str | tuple[str, ...]) → tuple[tuple[str, str], ...] | Calls localized_labels on this VariableInstance instance. |
requested_language_hints(language: str | tuple[str, ...]) → tuple[RequestedLanguageHint, ...] | Returns language hint objects requested for the given language(s) |
language_profiles(language: str | tuple[str, ...]) → tuple[LanguageProfile, ...] | Returns language profile objects applicable to the given language(s) |
format_coordinates(axes: dict[str, VariableAxis] | tuple[VariableAxis, ...] | list[VariableAxis], language: str | tuple[str, ...], include_tags: bool) → tuple[str, ...] | ` produces a tuple of formatted strings that describe the instance’s coordinates for the given axes and language |
css_variation_settings(axes: dict[str, VariableAxis] | tuple[VariableAxis, ...] | list[VariableAxis]) → tuple[str, ...] | Produces a tuple of CSS font-variation-settings strings for the given collection of axes |
to_presentation(axes: dict[str, VariableAxis] | tuple[VariableAxis, ...] | list[VariableAxis], language: str | tuple[str, ...], include_tags: bool) → dict[str, object] | Returns a dictionary suitable for presentation, containing formatted coordinates and metadata |