1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

HarfBuzz: Update to version 5.2.0, add new Unicode 15 blocks and scripts.

This commit is contained in:
bruvzg
2022-09-17 23:19:11 +03:00
parent 4ab3fdcda0
commit ec8084d87f
88 changed files with 6628 additions and 3942 deletions

View File

@@ -601,9 +601,13 @@ hb_ot_layout_table_select_script (hb_face_t *face,
* @feature_tags: (out) (array length=feature_count): Array of feature tags found in the table
*
* Fetches a list of all feature tags in the given face's GSUB or GPOS table.
* Note that there might be duplicate feature tags, belonging to different
* script/language-system pairs of the table.
*
* Return value: Total number of feature tags.
*
* Since: 0.6.0
*
**/
unsigned int
hb_ot_layout_table_get_feature_tags (hb_face_t *face,
@@ -629,6 +633,9 @@ hb_ot_layout_table_get_feature_tags (hb_face_t *face,
* or GPOS table.
*
* Return value: `true` if the feature is found, `false` otherwise
*
* Since: 0.6.0
*
**/
bool
hb_ot_layout_table_find_feature (hb_face_t *face,
@@ -668,6 +675,8 @@ hb_ot_layout_table_find_feature (hb_face_t *face,
*
* Return value: Total number of language tags.
*
* Since: 0.6.0
*
**/
unsigned int
hb_ot_layout_script_get_language_tags (hb_face_t *face,
@@ -778,6 +787,8 @@ hb_ot_layout_script_select_language (hb_face_t *face,
*
* Return value: `true` if the feature is found, `false` otherwise
*
* Since: 0.6.0
*
**/
hb_bool_t
hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
@@ -846,6 +857,9 @@ hb_ot_layout_language_get_required_feature (hb_face_t *face,
* returned will begin at the offset provided.
*
* Return value: Total number of features.
*
* Since: 0.6.0
*
**/
unsigned int
hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
@@ -879,6 +893,9 @@ hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
* returned will begin at the offset provided.
*
* Return value: Total number of feature tags.
*
* Since: 0.6.0
*
**/
unsigned int
hb_ot_layout_language_get_feature_tags (hb_face_t *face,
@@ -919,6 +936,8 @@ hb_ot_layout_language_get_feature_tags (hb_face_t *face,
*
* Return value: `true` if the feature is found, `false` otherwise
*
* Since: 0.6.0
*
**/
hb_bool_t
hb_ot_layout_language_find_feature (hb_face_t *face,
@@ -1167,9 +1186,12 @@ script_collect_features (hb_collect_features_context_t *c,
* hb_ot_layout_collect_features:
* @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
* @scripts: (nullable) (array zero-terminated=1): The array of scripts to collect features for,
* terminated by %HB_TAG_NONE
* @languages: (nullable) (array zero-terminated=1): The array of languages to collect features for,
* 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
*
* Fetches a list of all feature indexes in the specified face's GSUB table
@@ -1216,9 +1238,12 @@ hb_ot_layout_collect_features (hb_face_t *face,
* hb_ot_layout_collect_lookups:
* @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
* @scripts: (nullable) (array zero-terminated=1): The array of scripts to collect lookups for,
* terminated by %HB_TAG_NONE
* @languages: (nullable) (array zero-terminated=1): The array of languages to collect lookups for,
* terminated by %HB_TAG_NONE
* @features: (nullable) (array zero-terminated=1): The array of features to collect lookups for,
* terminated by %HB_TAG_NONE
* @lookup_indexes: (out): The array of lookup indexes found for the query
*
* Fetches a list of all feature-lookup indexes in the specified face's GSUB
@@ -1316,6 +1341,8 @@ hb_ot_layout_lookup_collect_glyphs (hb_face_t *face,
*
* Return value: `true` if feature variations were found, `false` otherwise.
*
* Since: 1.4.0
*
**/
hb_bool_t
hb_ot_layout_table_find_feature_variations (hb_face_t *face,
@@ -1347,6 +1374,8 @@ hb_ot_layout_table_find_feature_variations (hb_face_t *face,
*
* Return value: Total number of lookups.
*
* Since: 1.4.0
*
**/
unsigned int
hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face,
@@ -1379,6 +1408,8 @@ hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face,
*
* Return value: `true` if data found, `false` otherwise
*
* Since: 0.6.0
*
**/
hb_bool_t
hb_ot_layout_has_substitution (hb_face_t *face)
@@ -2297,11 +2328,6 @@ struct hb_get_glyph_alternates_dispatch_t :
static return_t default_return_value () { return 0; }
bool stop_sublookup_iteration (return_t r) const { return r; }
hb_face_t *face;
hb_get_glyph_alternates_dispatch_t (hb_face_t *face) :
face (face) {}
private:
template <typename T, typename ...Ts> auto
_dispatch (const T &obj, hb_priority<1>, Ts&&... ds) HB_AUTO_RETURN
@@ -2340,7 +2366,7 @@ hb_ot_layout_lookup_get_glyph_alternates (hb_face_t *face,
unsigned *alternate_count /* IN/OUT. May be NULL. */,
hb_codepoint_t *alternate_glyphs /* OUT. May be NULL. */)
{
hb_get_glyph_alternates_dispatch_t c (face);
hb_get_glyph_alternates_dispatch_t c;
const OT::SubstLookup &lookup = face->table.GSUB->table->get_lookup (lookup_index);
auto ret = lookup.dispatch (&c, glyph, start_offset, alternate_count, alternate_glyphs);
if (!ret && alternate_count) *alternate_count = 0;