Class: PangoOT::Info
- Inherits:
-
Object
- Object
- PangoOT::Info
- Defined in:
- (unknown)
Class Method Summary collapse
-
.get(face) ⇒ PangoOT::Info
Returns the
PangoOTInfostructure for the given FreeType font face.
Instance Method Summary collapse
-
#find_feature(table_type, feature_tag, script_index, language_index, feature_index) ⇒ Boolean
Finds the index of a feature.
-
#find_language(table_type, script_index, language_tag, language_index, required_feature_index) ⇒ Boolean
Finds the index of a language and its required feature index.
-
#find_script(table_type, script_tag, script_index) ⇒ Boolean
Finds the index of a script.
-
#list_features(table_type, tag, script_index, language_index) ⇒ PangoOT::Tag
Obtains the list of features for the given language of the given script.
-
#list_languages(table_type, script_index, language_tag) ⇒ PangoOT::Tag
Obtains the list of available languages for a given script.
-
#list_scripts(table_type) ⇒ PangoOT::Tag
Obtains the list of available scripts.
Class Method Details
.get(face) ⇒ PangoOT::Info
Returns the PangoOTInfo structure for the given FreeType font face.
Instance Method Details
#find_feature(table_type, feature_tag, script_index, language_index, feature_index) ⇒ Boolean
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 [methodPangoOT.Ruleset.add_feature] and similar functions.
In the future, this may set feature_index to an special value that if used in [methodPangoOT.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.
#find_language(table_type, script_index, language_tag, language_index, required_feature_index) ⇒ Boolean
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.
#find_script(table_type, script_tag, script_index) ⇒ Boolean
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.
#list_features(table_type, tag, script_index, language_index) ⇒ PangoOT::Tag
Obtains the list of features for the given language of the given script.
#list_languages(table_type, script_index, language_tag) ⇒ PangoOT::Tag
Obtains the list of available languages for a given script.
#list_scripts(table_type) ⇒ PangoOT::Tag
Obtains the list of available scripts.