PangoOT.RulesetDescription

Fields

Name

Type

Access

Description

language

Pango.Language

r/w

a PangoLanguage

n_other_features

int

r/w

length of other_features, or 0.

n_static_gpos_features

int

r/w

length of static_gpos_features, or 0.

n_static_gsub_features

int

r/w

length of static_gsub_features, or 0.

other_features

PangoOT.FeatureMap

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

Pango.Script

r/w

a PangoScript

static_gpos_features

PangoOT.FeatureMap

r/w

static map of GPOS features

static_gsub_features

PangoOT.FeatureMap

r/w

static map of GSUB features

Methods

copy ()

equal (desc2)

free ()

hash ()

Details

class PangoOT.RulesetDescription

The PangoOTRuleset structure holds all the information needed to build a complete PangoOTRuleset 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 using PangoOT.Ruleset.get_for_description() or create a new one using PangoOT.Ruleset.new_from_description().

New in version 1.18.

copy()
Returns:

the newly allocated PangoOTRulesetDescription

Return type:

PangoOT.RulesetDescription

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:

bool

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.

hash()
Returns:

the hash value

Return type:

int

Computes a hash of a PangoOTRulesetDescription structure suitable to be used, for example, as an argument to g_hash_table_new().

New in version 1.18.