Functions
hb_ot_layout_collect_lookups ()
void
hb_ot_layout_collect_lookups (hb_face_t *face
,
hb_tag_t table_tag
,
const hb_tag_t *scripts
,
const hb_tag_t *languages
,
const hb_tag_t *features
,
hb_set_t *lookup_indexes
);
Fetches a list of all feature-lookup indexes in the specified face's GSUB
table or GPOS table, underneath the specified scripts, languages, and
features. If no list of scripts is provided, all scripts will be queried.
If no list of languages is provided, all languages will be queried. If no
list of features is provided, all features will be queried.
Since: 0.9.8
hb_ot_layout_collect_features ()
void
hb_ot_layout_collect_features (hb_face_t *face
,
hb_tag_t table_tag
,
const hb_tag_t *scripts
,
const hb_tag_t *languages
,
const hb_tag_t *features
,
hb_set_t *feature_indexes
);
Fetches a list of all feature indexes in the specified face's GSUB table
or GPOS table, underneath the specified scripts, languages, and features.
If no list of scripts is provided, all scripts will be queried. If no list
of languages is provided, all languages will be queried. If no list of
features is provided, all features will be queried.
Since: 1.8.5
hb_ot_layout_feature_get_characters ()
unsigned int
hb_ot_layout_feature_get_characters (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int feature_index
,
unsigned int start_offset
,
unsigned int *char_count
,
hb_codepoint_t *characters
);
Fetches a list of the characters defined as having a variant under the specified
"Character Variant" ("cvXX") feature tag.
Returns
Number of total sample characters in the cvXX feature.
Since: 2.0.0
hb_ot_layout_feature_get_lookups ()
unsigned int
hb_ot_layout_feature_get_lookups (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int feature_index
,
unsigned int start_offset
,
unsigned int *lookup_count
,
unsigned int *lookup_indexes
);
Fetches a list of all lookups enumerated for the specified feature, in
the specified face's GSUB table or GPOS table. The list returned will
begin at the offset provided.
Since: 0.9.7
hb_ot_layout_feature_get_name_ids ()
hb_bool_t
hb_ot_layout_feature_get_name_ids (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int feature_index
,
hb_ot_name_id_t *label_id
,
hb_ot_name_id_t *tooltip_id
,
hb_ot_name_id_t *sample_id
,
unsigned int *num_named_parameters
,
hb_ot_name_id_t *first_param_id
);
Fetches name indices from feature parameters for "Stylistic Set" ('ssXX') or
"Character Variant" ('cvXX') features.
Returns
true
if data found, false otherwise
Since: 2.0.0
hb_ot_layout_feature_with_variations_get_lookups ()
unsigned int
hb_ot_layout_feature_with_variations_get_lookups
(hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int feature_index
,
unsigned int variations_index
,
unsigned int start_offset
,
unsigned int *lookup_count
,
unsigned int *lookup_indexes
);
Fetches a list of all lookups enumerated for the specified feature, in
the specified face's GSUB table or GPOS table, enabled at the specified
variations index. The list returned will begin at the offset provided.
hb_ot_layout_get_attach_points ()
unsigned int
hb_ot_layout_get_attach_points (hb_face_t *face
,
hb_codepoint_t glyph
,
unsigned int start_offset
,
unsigned int *point_count
,
unsigned int *point_array
);
Fetches a list of all attachment points for the specified glyph in the GDEF
table of the face. The list returned will begin at the offset provided.
Useful if the client program wishes to cache the list.
hb_ot_layout_get_glyphs_in_class ()
void
hb_ot_layout_get_glyphs_in_class (hb_face_t *face
,
hb_ot_layout_glyph_class_t klass
,
hb_set_t *glyphs
);
Retrieves the set of all glyphs from the face that belong to the requested
glyph class in the face's GDEF table.
Since: 0.9.7
hb_ot_layout_get_ligature_carets ()
unsigned int
hb_ot_layout_get_ligature_carets (hb_font_t *font
,
hb_direction_t direction
,
hb_codepoint_t glyph
,
unsigned int start_offset
,
unsigned int *caret_count
,
hb_position_t *caret_array
);
Fetches a list of the caret positions defined for a ligature glyph in the GDEF
table of the font. The list returned will begin at the offset provided.
hb_ot_layout_get_size_params ()
hb_bool_t
hb_ot_layout_get_size_params (hb_face_t *face
,
unsigned int *design_size
,
unsigned int *subfamily_id
,
hb_ot_name_id_t *subfamily_name_id
,
unsigned int *range_start
,
unsigned int *range_end
);
Fetches optical-size feature data (i.e., the size
feature from GPOS). Note that
the subfamily_id and the subfamily name string (accessible via the subfamily_name_id)
as used here are defined as pertaining only to fonts within a font family that differ
specifically in their respective size ranges; other ways to differentiate fonts within
a subfamily are not covered by the size
feature.
For more information on this distinction, see the size
feature documentation.
Returns
true
if data found, false otherwise
Since: 0.9.10
hb_ot_layout_glyph_sequence_func_t ()
hb_bool_t
(*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font
,
hb_tag_t table_tag
,
unsigned int lookup_index
,
const hb_ot_layout_glyph_sequence_t *sequence
,
void *user_data
);
hb_ot_layout_has_glyph_classes ()
hb_bool_t
hb_ot_layout_has_glyph_classes (hb_face_t *face
);
Tests whether a face has any glyph classes defined in its GDEF table.
Returns
true
if data found, false otherwise
hb_ot_layout_has_positioning ()
hb_bool_t
hb_ot_layout_has_positioning (hb_face_t *face
);
Returns
true
if the face has GPOS data, false otherwise
hb_ot_layout_has_substitution ()
hb_bool_t
hb_ot_layout_has_substitution (hb_face_t *face
);
Tests whether the specified face includes any GSUB substitutions.
Returns
true
if data found, false otherwise
hb_ot_layout_language_find_feature ()
hb_bool_t
hb_ot_layout_language_find_feature (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int language_index
,
hb_tag_t feature_tag
,
unsigned int *feature_index
);
Fetches the index of a given feature tag in the specified face's GSUB table
or GPOS table, underneath the specified script and language.
Returns
true
if the feature is found, false otherwise
hb_ot_layout_language_get_feature_indexes ()
unsigned int
hb_ot_layout_language_get_feature_indexes
(hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int language_index
,
unsigned int start_offset
,
unsigned int *feature_count
,
unsigned int *feature_indexes
);
Fetches a list of all features in the specified face's GSUB table
or GPOS table, underneath the specified script and language. The list
returned will begin at the offset provided.
hb_ot_layout_language_get_feature_tags ()
unsigned int
hb_ot_layout_language_get_feature_tags
(hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int language_index
,
unsigned int start_offset
,
unsigned int *feature_count
,
hb_tag_t *feature_tags
);
Fetches a list of all features in the specified face's GSUB table
or GPOS table, underneath the specified script and language. The list
returned will begin at the offset provided.
hb_ot_layout_language_get_required_feature ()
hb_bool_t
hb_ot_layout_language_get_required_feature
(hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int language_index
,
unsigned int *feature_index
,
hb_tag_t *feature_tag
);
Fetches the tag of a requested feature index in the given face's GSUB or GPOS table,
underneath the specified script and language.
Returns
true
if the feature is found, false otherwise
Since: 0.9.30
hb_ot_layout_lookup_collect_glyphs ()
void
hb_ot_layout_lookup_collect_glyphs (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int lookup_index
,
hb_set_t *glyphs_before
,
hb_set_t *glyphs_input
,
hb_set_t *glyphs_after
,
hb_set_t *glyphs_output
);
Fetches a list of all glyphs affected by the specified lookup in the
specified face's GSUB table or GPOS table.
Since: 0.9.7
hb_ot_layout_lookup_get_glyph_alternates ()
unsigned
hb_ot_layout_lookup_get_glyph_alternates
(hb_face_t *face
,
unsigned lookup_index
,
hb_codepoint_t glyph
,
unsigned start_offset
,
unsigned *alternate_count
,
hb_codepoint_t *alternate_glyphs
);
Fetches alternates of a glyph from a given GSUB lookup index.
Returns
total number of alternates found in the specific lookup index for the given glyph id.
Since: 2.6.8
hb_ot_layout_lookup_substitute_closure ()
void
hb_ot_layout_lookup_substitute_closure
(hb_face_t *face
,
unsigned int lookup_index
,
hb_set_t *glyphs
);
Compute the transitive closure of glyphs needed for a
specified lookup.
Since: 0.9.7
hb_ot_layout_lookups_substitute_closure ()
void
hb_ot_layout_lookups_substitute_closure
(hb_face_t *face
,
const hb_set_t *lookups
,
hb_set_t *glyphs
);
Compute the transitive closure of glyphs needed for all of the
provided lookups.
Since: 1.8.1
hb_ot_layout_lookup_would_substitute ()
hb_bool_t
hb_ot_layout_lookup_would_substitute (hb_face_t *face
,
unsigned int lookup_index
,
const hb_codepoint_t *glyphs
,
unsigned int glyphs_length
,
hb_bool_t zero_context
);
Tests whether a specified lookup in the specified face would
trigger a substitution on the given glyph sequence.
Returns
true
if a substitution would be triggered, false otherwise
Since: 0.9.7
hb_ot_layout_script_get_language_tags ()
unsigned int
hb_ot_layout_script_get_language_tags (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int start_offset
,
unsigned int *language_count
,
hb_tag_t *language_tags
);
Fetches a list of language tags in the given face's GSUB or GPOS table, underneath
the specified script index. The list returned will begin at the offset provided.
hb_ot_layout_script_select_language ()
hb_bool_t
hb_ot_layout_script_select_language (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int language_count
,
const hb_tag_t *language_tags
,
unsigned int *language_index
);
Fetches the index of a given language tag in the specified face's GSUB table
or GPOS table, underneath the specified script index.
Returns
true
if the language tag is found, false otherwise
Since: 2.0.0
hb_ot_layout_table_find_feature_variations ()
hb_bool_t
hb_ot_layout_table_find_feature_variations
(hb_face_t *face
,
hb_tag_t table_tag
,
const int *coords
,
unsigned int num_coords
,
unsigned int *variations_index
);
Fetches a list of feature variations in the specified face's GSUB table
or GPOS table, at the specified variation coordinates.
hb_ot_layout_table_get_feature_tags ()
unsigned int
hb_ot_layout_table_get_feature_tags (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int start_offset
,
unsigned int *feature_count
,
hb_tag_t *feature_tags
);
Fetches a list of all feature tags in the given face's GSUB or GPOS table.
hb_ot_layout_table_get_script_tags ()
unsigned int
hb_ot_layout_table_get_script_tags (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int start_offset
,
unsigned int *script_count
,
hb_tag_t *script_tags
);
Fetches a list of all scripts enumerated in the specified face's GSUB table
or GPOS table. The list returned will begin at the offset provided.
hb_ot_layout_table_get_lookup_count ()
unsigned int
hb_ot_layout_table_get_lookup_count (hb_face_t *face
,
hb_tag_t table_tag
);
Fetches the total number of lookups enumerated in the specified
face's GSUB table or GPOS table.
Since: 0.9.22
hb_ot_layout_table_select_script ()
hb_bool_t
hb_ot_layout_table_select_script (hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_count
,
const hb_tag_t *script_tags
,
unsigned int *script_index
,
hb_tag_t *chosen_script
);
Since: 2.0.0
hb_ot_shape_plan_collect_lookups ()
void
hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan
,
hb_tag_t table_tag
,
hb_set_t *lookup_indexes
);
Computes the complete set of GSUB or GPOS lookups that are applicable
under a given shape_plan
.
Since: 0.9.7
hb_ot_layout_language_get_required_feature_index ()
hb_bool_t
hb_ot_layout_language_get_required_feature_index
(hb_face_t *face
,
hb_tag_t table_tag
,
unsigned int script_index
,
unsigned int language_index
,
unsigned int *feature_index
);
Fetches the index of a requested feature in the given face's GSUB or GPOS table,
underneath the specified script and language.
Returns
true
if the feature is found, false otherwise