PangoOT.RulesetDescription¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
language |
r/w |
a |
|
n_other_features |
r/w |
length of other_features, or 0. |
|
n_static_gpos_features |
r/w |
length of static_gpos_features, or 0. |
|
n_static_gsub_features |
r/w |
length of static_gsub_features, or 0. |
|
other_features |
r/w |
map of extra features to add to both GSUB and GPOS. Unlike the static maps, this pointer need not live beyond the life of function calls taking this struct. |
|
script |
r/w |
a |
|
static_gpos_features |
r/w |
static map of GPOS features |
|
static_gsub_features |
r/w |
static map of GSUB features |
Methods¶
|
|
|
|
|
|
|
Details¶
- class PangoOT.RulesetDescription¶
The
PangoOTRuleset
structure holds all the information needed to build a completePangoOTRuleset
from an OpenType font. The main use of this struct is to act as the key for a per-font hash of rulesets. The user populates a ruleset description and gets the ruleset usingPangoOT.Ruleset.get_for_description
() or create a new one usingPangoOT.Ruleset.new_from_description
().New in version 1.18.
- copy()¶
- Returns:
the newly allocated
PangoOTRulesetDescription
- Return type:
Creates a copy of self, which should be freed with [method`PangoOT`.RulesetDescription.free].
Primarily used internally by [func`PangoOT`.Ruleset.get_for_description] to cache rulesets for ruleset descriptions.
New in version 1.18.
- equal(desc2)¶
- Parameters:
desc2 (
PangoOT.RulesetDescription
) – a ruleset description- Returns:
True
if two ruleset descriptions are identical,False
otherwise- Return type:
Compares two ruleset descriptions for equality.
Two ruleset descriptions are considered equal if the rulesets they describe are provably identical. This means that their script, language, and all feature sets should be equal.
For static feature sets, the array addresses are compared directly, while for other features, the list of features is compared one by one.(Two ruleset descriptions may result in identical rulesets being created, but still compare
False
.)New in version 1.18.
- free()¶
Frees a ruleset description allocated by
PangoOT.RulesetDescription.copy
().New in version 1.18.