:right-sidebar: True Info =================================================================== .. currentmodule:: gi.repository.PangoOT .. class:: Info(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` :Constructors: :: Info(**properties) Methods ------- .. rst-class:: interim-class .. class:: Info :no-index: .. method:: find_feature(table_type: ~gi.repository.PangoOT.TableType, feature_tag: int, script_index: int, language_index: int) -> ~typing.Tuple[bool, int] Finds the index of a feature. If the feature is not found, sets ``feature_index`` to PANGO_OT_NO_FEATURE, which is safe to pass to :obj:`~gi.repository.PangoOT.Ruleset.add_feature` and similar functions. In the future, this may set ``feature_index`` to an special value that if used in :obj:`~gi.repository.PangoOT.Ruleset.add_feature` will ask Pango to synthesize the requested feature based on Unicode properties and data. However, this function will still return :const:`False` in those cases. So, users may want to ignore the return value of this function in certain cases. :param table_type: the table type to obtain information about :param feature_tag: the tag of the feature to find :param script_index: the index of the script :param language_index: the index of the language whose features are searched, or :const:`~gi.repository.PangoOT.DEFAULT_LANGUAGE` to use the default language of the script .. method:: find_language(table_type: ~gi.repository.PangoOT.TableType, script_index: int, language_tag: int) -> ~typing.Tuple[bool, int, int] Finds the index of a language and its required feature index. If the language is not found, sets ``language_index`` to :const:`~gi.repository.PangoOT.DEFAULT_LANGUAGE` and the required feature of the default language system is returned in required_feature_index. For best compatibility with some fonts, also searches the language system tag 'dflt' before falling back to the default language system, but that is transparent to the user. The user can simply ignore the return value of this function to automatically fall back to the default language system. :param table_type: the table type to obtain information about :param script_index: the index of the script whose languages are searched :param language_tag: the tag of the language to find .. method:: find_script(table_type: ~gi.repository.PangoOT.TableType, script_tag: int) -> ~typing.Tuple[bool, int] Finds the index of a script. If not found, tries to find the 'DFLT' and then 'dflt' scripts and return the index of that in ``script_index``\. If none of those is found either, :const:`~gi.repository.PangoOT.NO_SCRIPT` is placed in ``script_index``\. All other functions taking an input script_index parameter know how to handle :const:`~gi.repository.PangoOT.NO_SCRIPT`, so one can ignore the return value of this function completely and proceed, to enjoy the automatic fallback to the 'DFLT'/'dflt' script. :param table_type: the table type to obtain information about :param script_tag: the tag of the script to find .. classmethod:: get() -> ~gi.repository.PangoOT.Info Returns the ``PangoOTInfo`` structure for the given FreeType font face. .. versionadded:: 1.2 .. method:: list_features(table_type: ~gi.repository.PangoOT.TableType, tag: int, script_index: int, language_index: int) -> int Obtains the list of features for the given language of the given script. :param table_type: the table type to obtain information about :param tag: unused parameter :param script_index: the index of the script to obtain information about :param language_index: the index of the language to list features for, or :const:`~gi.repository.PangoOT.DEFAULT_LANGUAGE`, to list features for the default language of the script .. method:: list_languages(table_type: ~gi.repository.PangoOT.TableType, script_index: int, language_tag: int) -> int Obtains the list of available languages for a given script. :param table_type: the table type to obtain information about :param script_index: the index of the script to list languages for :param language_tag: unused parameter .. method:: list_scripts(table_type: ~gi.repository.PangoOT.TableType) -> int Obtains the list of available scripts. :param table_type: the table type to obtain information about