Class: PangoOT::Info

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#find_feature(table_type, feature_tag, script_index, language_index, feature_index) ⇒ TrueClass

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 pango_ot_ruleset_add_feature() and similar functions.

In the future, this may set feature_index to an special value that if used in pango_ot_ruleset_add_feature() will ask Pango to synthesize the requested feature based on Unicode properties and data. However, this function will still return false in those cases. So, users may want to ignore the return value of this function in certain cases.

Parameters:

  • table_type (PangoOT::TableType)

    the table type to obtain information about.

  • feature_tag (PangoOT::Tag)

    the tag of the feature to find.

  • script_index (Integer)

    the index of the script.

  • language_index (Integer)

    the index of the language whose features are searched, or %PANGO_OT_DEFAULT_LANGUAGE to use the default language of the script.

  • feature_index (Integer)

    location to store the index of the feature, or nil.

Returns:

  • (TrueClass)

    true if the feature was found.

#find_language(table_type, script_index, language_tag, language_index, required_feature_index) ⇒ TrueClass

Finds the index of a language and its required feature index. If the language is not found, sets language_index to PANGO_OT_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.

Parameters:

  • table_type (PangoOT::TableType)

    the table type to obtain information about.

  • script_index (Integer)

    the index of the script whose languages are searched.

  • language_tag (PangoOT::Tag)

    the tag of the language to find.

  • language_index (Integer)

    location to store the index of the language, or nil.

  • required_feature_index (Integer)

    location to store the required feature index of the language, or nil.

Returns:

  • (TrueClass)

    true if the language was found.

#find_script(table_type, script_tag, script_index) ⇒ TrueClass

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, %PANGO_OT_NO_SCRIPT is placed in script_index.

All other functions taking an input script_index parameter know how to handle %PANGO_OT_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.

Parameters:

  • table_type (PangoOT::TableType)

    the table type to obtain information about.

  • script_tag (PangoOT::Tag)

    the tag of the script to find.

  • script_index (Integer)

    location to store the index of the script, or nil.

Returns:

  • (TrueClass)

    true if the script was found.

#list_features(table_type, tag, script_index, language_index) ⇒ PangoOT::Tag

Obtains the list of features for the given language of the given script. available features. Should be freed using g_free().

Parameters:

  • table_type (PangoOT::TableType)

    the table type to obtain information about.

  • tag (PangoOT::Tag)

    unused parameter.

  • script_index (Integer)

    the index of the script to obtain information about.

  • language_index (Integer)

    the index of the language to list features for, or %PANGO_OT_DEFAULT_LANGUAGE, to list features for the default language of the script.

Returns:

  • (PangoOT::Tag)

    a newly-allocated zero-terminated array containing the tags of the

#list_languages(table_type, script_index, language_tag) ⇒ PangoOT::Tag

Obtains the list of available languages for a given script.

Parameters:

  • table_type (PangoOT::TableType)

    the table type to obtain information about.

  • script_index (Integer)

    the index of the script to list languages for.

  • language_tag (PangoOT::Tag)

    unused parameter.

Returns:

  • (PangoOT::Tag)

    a newly-allocated zero-terminated array containing the tags of the available languages. Should be freed using g_free().

#list_scripts(table_type) ⇒ PangoOT::Tag

Obtains the list of available scripts.

Parameters:

Returns:

  • (PangoOT::Tag)

    a newly-allocated zero-terminated array containing the tags of the available scripts. Should be freed using g_free().