VariableInstance

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

NameTypeAccessDescription
available_languagestuple[str, ...]ReadGets the available languages.
labelstrReadGets the label.
coordinatesdict[str, float]Read/WriteGets or sets the coordinates.
name_idintRead/WriteGets or sets the name id.
postscript_name_idint | NoneRead/WriteGets or sets the postscript name id.
names_by_languagedict[str, str]Read/WriteGets or sets the names by language.
postscript_namestr | NoneRead/WriteGets or sets the postscript name.

Methods

SignatureDescription
name(language: str | tuple[str, ...])str | NoneReturns the instance name for the specified language or language tuple, or None if unavailable
localization_resolution(language: str | tuple[str, ...])LocalizationResolutionReturns a LocalizationResolution describing name resolution for the given language(s)
localization_coverage(language: str | tuple[str, ...])LocalizationCoverageReturns 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

See Also