You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
HarfBuzz: Update to version 8.1.1
This commit is contained in:
40
thirdparty/harfbuzz/src/hb-ot-layout.cc
vendored
40
thirdparty/harfbuzz/src/hb-ot-layout.cc
vendored
@@ -1241,7 +1241,7 @@ script_collect_features (hb_collect_features_context_t *c,
|
||||
* terminated by %HB_TAG_NONE
|
||||
* @features: (nullable) (array zero-terminated=1): The array of features to collect,
|
||||
* terminated by %HB_TAG_NONE
|
||||
* @feature_indexes: (out): The array of feature indexes found for the query
|
||||
* @feature_indexes: (out): The set of feature indexes found for the query
|
||||
*
|
||||
* Fetches a list of all feature indexes in the specified face's GSUB table
|
||||
* or GPOS table, underneath the specified scripts, languages, and features.
|
||||
@@ -1282,6 +1282,44 @@ hb_ot_layout_collect_features (hb_face_t *face,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* hb_ot_layout_collect_features_map:
|
||||
* @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_map: (out): The map of feature tag to feature index.
|
||||
*
|
||||
* Fetches the mapping from feature tags to feature indexes for
|
||||
* the specified script and language.
|
||||
*
|
||||
* Since: 8.1.0
|
||||
**/
|
||||
void
|
||||
hb_ot_layout_collect_features_map (hb_face_t *face,
|
||||
hb_tag_t table_tag,
|
||||
unsigned script_index,
|
||||
unsigned language_index,
|
||||
hb_map_t *feature_map /* OUT */)
|
||||
{
|
||||
const OT::GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
|
||||
const OT::LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
|
||||
|
||||
unsigned int count = l.get_feature_indexes (0, nullptr, nullptr);
|
||||
feature_map->alloc (count);
|
||||
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
unsigned feature_index = 0;
|
||||
unsigned feature_count = 1;
|
||||
l.get_feature_indexes (i, &feature_count, &feature_index);
|
||||
if (!feature_count)
|
||||
break;
|
||||
hb_tag_t feature_tag = g.get_feature_tag (feature_index);
|
||||
feature_map->set (feature_tag, feature_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hb_ot_layout_collect_lookups:
|
||||
|
||||
Reference in New Issue
Block a user