Top |
#define | HB_OT_MAX_TAGS_PER_LANGUAGE |
#define | HB_OT_MAX_TAGS_PER_SCRIPT |
#define | HB_OT_TAG_DEFAULT_LANGUAGE |
#define | HB_OT_TAG_DEFAULT_SCRIPT |
#define | HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX |
#define | HB_OT_LAYOUT_NO_FEATURE_INDEX |
#define | HB_OT_LAYOUT_NO_SCRIPT_INDEX |
#define | HB_OT_LAYOUT_NO_VARIATIONS_INDEX |
#define | HB_OT_TAG_BASE |
#define | HB_OT_TAG_GDEF |
#define | HB_OT_TAG_GPOS |
#define | HB_OT_TAG_GSUB |
#define | HB_OT_TAG_JSTF |
enum | hb_ot_layout_baseline_tag_t |
enum | hb_ot_layout_glyph_class_t |
void hb_ot_tags_from_script_and_language (hb_script_t script
,hb_language_t language
,unsigned int *script_count
,hb_tag_t *script_tags
,unsigned int *language_count
,hb_tag_t *language_tags
);
Converts an hb_script_t and an hb_language_t to script and language tags.
script |
an hb_script_t to convert. |
|
language |
an hb_language_t to convert. |
|
script_count |
maximum number of script tags to retrieve (IN) and actual number of script tags retrieved (OUT). |
[allow-none] |
script_tags |
array of size at least |
[out][allow-none] |
language_count |
maximum number of language tags to retrieve (IN) and actual number of language tags retrieved (OUT). |
[allow-none] |
language_tags |
array of size at least |
[out][allow-none] |
Since: 2.0.0
void hb_ot_tags_to_script_and_language (hb_tag_t script_tag
,hb_tag_t language_tag
,hb_script_t *script
,hb_language_t *language
);
Converts a script tag and a language tag to an hb_script_t and an hb_language_t.
script_tag |
a script tag |
|
language_tag |
a language tag |
|
script |
the hb_script_t corresponding to |
[allow-none] |
language |
the hb_language_t corresponding to |
[allow-none] |
Since: 2.0.0
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
scripts |
The array of scripts to collect lookups for |
|
languages |
The array of languages to collect lookups for |
|
features |
The array of features to collect lookups for |
|
lookup_indexes |
The array of lookup indexes found for the query. |
[out] |
Since: 0.9.8
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
scripts |
The array of scripts to collect features for |
|
languages |
The array of languages to collect features for |
|
features |
The array of features to collect |
|
feature_indexes |
The array of feature indexes found for the query. |
[out] |
Since: 1.8.5
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.
face |
hb_face_t to work upon |
|
table_tag |
table tag to query, "GSUB" or "GPOS". |
|
feature_index |
index of feature to query. |
|
start_offset |
offset of the first character to retrieve |
|
char_count |
Input = the maximum number of characters to return; Output = the actual number of characters returned (may be zero). |
[inout][allow-none] |
characters |
A buffer pointer. The Unicode codepoints of the characters for which this feature provides glyph variants. |
[out caller-allocates][array length=char_count] |
Since: 2.0.0
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
feature_index |
The index of the requested feature |
|
start_offset |
offset of the first lookup to retrieve |
|
lookup_count |
Input = the maximum number of lookups to return; Output = the actual number of lookups returned (may be zero). |
[inout][allow-none] |
lookup_indexes |
The array of lookup indexes found for the query. |
[out][array length=lookup_count] |
Since: 0.9.7
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.
face |
hb_face_t to work upon |
|
table_tag |
table tag to query, "GSUB" or "GPOS". |
|
feature_index |
index of feature to query. |
|
label_id |
The ‘name’ table name ID that specifies a string for a user-interface label for this feature. (May be NULL.). |
[out][allow-none] |
tooltip_id |
The ‘name’ table name ID that specifies a string that an application can use for tooltip text for this feature. (May be NULL.). |
[out][allow-none] |
sample_id |
The ‘name’ table name ID that specifies sample text that illustrates the effect of this feature. (May be NULL.). |
[out][allow-none] |
num_named_parameters |
Number of named parameters. (May be zero.). |
[out][allow-none] |
first_param_id |
The first ‘name’ table name ID used to specify strings for user-interface labels for the feature parameters. (Must be zero if numParameters is zero.). |
[out][allow-none] |
Since: 2.0.0
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
feature_index |
The index of the feature to query |
|
variations_index |
The index of the feature variation to query |
|
start_offset |
offset of the first lookup to retrieve |
|
lookup_count |
Input = the maximum number of lookups to return; Output = the actual number of lookups returned (may be zero). |
[inout][allow-none] |
lookup_indexes |
The array of lookups found for the query. |
[out][array length=lookup_count] |
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.
face |
The hb_face_t to work on |
|
glyph |
The hb_codepoint_t code point to query |
|
start_offset |
offset of the first attachment point to retrieve |
|
point_count |
Input = the maximum number of attachment points to return; Output = the actual number of attachment points returned (may be zero). |
[inout][allow-none] |
point_array |
The array of attachment points found for the query. |
[out][array length=point_count] |
hb_bool_t hb_ot_layout_get_baseline (hb_font_t *font
,hb_ot_layout_baseline_tag_t baseline_tag
,hb_direction_t direction
,hb_tag_t script_tag
,hb_tag_t language_tag
,hb_position_t *coord
);
Fetches a baseline value from the face.
font |
a font |
|
baseline_tag |
a baseline tag |
|
direction |
text direction. |
|
script_tag |
script tag. |
|
language_tag |
language tag. |
|
coord |
baseline value if found. |
[out] |
Since: 2.6.0
hb_ot_layout_glyph_class_t hb_ot_layout_get_glyph_class (hb_face_t *face
,hb_codepoint_t glyph
);
Fetches the GDEF class of the requested glyph in the specified face.
The hb_ot_layout_glyph_class_t glyph class of the given code point in the GDEF table of the face.
Since: 0.9.7
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.
face |
The hb_face_t to work on |
|
klass |
The hb_ot_layout_glyph_class_t GDEF class to retrieve |
|
glyphs |
The hb_set_t set of all glyphs belonging to the requested class. |
[out] |
Since: 0.9.7
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.
font |
The hb_font_t to work on |
|
direction |
The hb_direction_t text direction to use |
|
glyph |
The hb_codepoint_t code point to query |
|
start_offset |
offset of the first caret position to retrieve |
|
caret_count |
Input = the maximum number of caret positions to return; Output = the actual number of caret positions returned (may be zero). |
[inout][allow-none] |
caret_array |
The array of caret positions found for the query. |
[out][array length=caret_count] |
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.
face |
hb_face_t to work upon |
|
design_size |
The design size of the face. |
[out] |
subfamily_id |
The identifier of the face within the font subfamily. |
[out] |
subfamily_name_id |
The ‘name’ table name ID of the face within the font subfamily. |
[out] |
range_start |
The minimum size of the recommended size range for the face. |
[out] |
range_end |
The maximum size of the recommended size range for the face. |
[out] |
Since: 0.9.10
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_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.
hb_bool_t
hb_ot_layout_has_substitution (hb_face_t *face
);
Tests whether the specified face includes any GSUB substitutions.
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.
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
script_index |
The index of the requested script tag |
|
language_index |
The index of the requested language tag |
|
start_offset |
offset of the first feature tag to retrieve |
|
feature_count |
Input = the maximum number of feature tags to return; Output: the actual number of feature tags returned (may be zero). |
[inout][allow-none] |
feature_indexes |
The array of feature indexes found for the query. |
[out][array length=feature_count] |
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
script_index |
The index of the requested script tag |
|
language_index |
The index of the requested language tag |
|
start_offset |
offset of the first feature tag to retrieve |
|
feature_count |
Input = the maximum number of feature tags to return; Output = the actual number of feature tags returned (may be zero). |
[inout][allow-none] |
feature_tags |
The array of hb_tag_t feature tags found for the query. |
[out][array length=feature_count] |
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.
Since: 0.9.30
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
lookup_index |
The index of the feature lookup to query |
|
glyphs_before |
Array of glyphs preceding the substitution range. |
[out] |
glyphs_input |
Array of input glyphs that would be substituted by the lookup. |
[out] |
glyphs_after |
Array of glyphs following the substitution range. |
[out] |
glyphs_output |
Array of glyphs that would be the substituted output of the lookup. |
[out] |
Since: 0.9.7
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.
face |
a face. |
|
lookup_index |
index of the feature lookup to query. |
|
glyph |
a glyph id. |
|
start_offset |
starting offset. |
|
alternate_count |
Input = the maximum number of alternate glyphs to return; Output = the actual number of alternate glyphs returned (may be zero). |
[inout][allow-none] |
alternate_glyphs |
A glyphs buffer. Alternate glyphs associated with the glyph id. |
[out caller-allocates][array length=alternate_count] |
Since: 2.6.8
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.
face |
hb_face_t to work upon |
|
lookup_index |
index of the feature lookup to query |
|
glyphs |
Array of glyphs comprising the transitive closure of the lookup. |
[out] |
Since: 0.9.7
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.
face |
hb_face_t to work upon |
|
lookups |
The set of lookups to query |
|
glyphs |
Array of glyphs comprising the transitive closure of the lookups. |
[out] |
Since: 1.8.1
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.
Since: 0.9.7
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
script_index |
The index of the requested script tag |
|
start_offset |
offset of the first language tag to retrieve |
|
language_count |
Input = the maximum number of language tags to return; Output = the actual number of language tags returned (may be zero). |
[inout][allow-none] |
language_tags |
Array of language tags found in the table. |
[out][array length=language_count] |
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
script_index |
The index of the requested script tag |
|
language_count |
The number of languages in the specified script |
|
language_tags |
The array of language tags |
|
language_index |
The index of the requested language. |
[out] |
Since: 2.0.0
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
coords |
The variation coordinates to query |
|
num_coords |
The number of variation coordinates |
|
variations_index |
The array of feature variations found for the query. |
[out] |
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
start_offset |
offset of the first feature tag to retrieve |
|
feature_count |
Input = the maximum number of feature tags to return; Output = the actual number of feature tags returned (may be zero). |
[inout][allow-none] |
feature_tags |
Array of feature tags found in the table. |
[out][array length=feature_count] |
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
start_offset |
offset of the first script tag to retrieve |
|
script_count |
Input = the maximum number of script tags to return; Output = the actual number of script tags returned (may be zero). |
[inout][allow-none] |
script_tags |
The array of hb_tag_t script tags found for the query. |
[out][array length=script_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_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
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
.
shape_plan |
hb_shape_plan_t to query |
|
table_tag |
GSUB or GPOS |
|
lookup_indexes |
The hb_set_t set of lookups returned. |
[out] |
Since: 0.9.7
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.
face |
hb_face_t to work upon |
|
table_tag |
HB_OT_TAG_GSUB or HB_OT_TAG_GPOS |
|
script_index |
The index of the requested script tag |
|
language_index |
The index of the requested language tag |
|
feature_index |
The index of the requested feature. |
[out] |
Baseline tags from https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags
The baseline used by alphabetic scripts such as Latin, Cyrillic and Greek. In vertical writing mode, the alphabetic baseline for characters rotated 90 degrees clockwise. (This would not apply to alphabetic characters that remain upright in vertical writing mode, since these characters are not rotated.) |
||
The hanging baseline. In horizontal direction, this is the horizontal line from which syllables seem, to hang in Tibetan and other similar scripts. In vertical writing mode, for Tibetan (or some other similar script) characters rotated 90 degrees clockwise. |
||
Ideographic character face bottom or left edge, if the direction is horizontal or vertical, respectively. |
||
Ideographic character face top or right edge, if the direction is horizontal or vertical, respectively. |
||
Ideographic em-box bottom or left edge, if the direction is horizontal or vertical, respectively. |
||
Ideographic em-box top or right edge baseline, if the direction is horizontal or vertical, respectively. |
||
The baseline about which mathematical characters are centered. In vertical writing mode when mathematical characters rotated 90 degrees clockwise, are centered. |
||
Since: 2.6.0
The GDEF classes defined for glyphs.