From 56544d80138cddd3a2e7ae8506f440af4c48f36d Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 31 Mar 2022 13:03:43 +0300 Subject: HarfBuzz: Update to version 4.2.0 --- thirdparty/harfbuzz/src/hb-set.cc | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'thirdparty/harfbuzz/src/hb-set.cc') diff --git a/thirdparty/harfbuzz/src/hb-set.cc b/thirdparty/harfbuzz/src/hb-set.cc index 204dbb5645..0e2c1f77ef 100644 --- a/thirdparty/harfbuzz/src/hb-set.cc +++ b/thirdparty/harfbuzz/src/hb-set.cc @@ -256,6 +256,29 @@ hb_set_add (hb_set_t *set, set->add (codepoint); } +/** + * hb_set_add_sorted_array: + * @set: A set + * @sorted_codepoints: (array length=num_codepoints): Array of codepoints to add + * @num_codepoints: Length of @sorted_codepoints + * + * Adds @num_codepoints codepoints to a set at once. + * The codepoints array must be in increasing order, + * with size at least @num_codepoints. + * + * Since: 4.1.0 + */ +HB_EXTERN void +hb_set_add_sorted_array (hb_set_t *set, + const hb_codepoint_t *sorted_codepoints, + unsigned int num_codepoints) +{ + /* Immutible-safe. */ + set->add_sorted_array (sorted_codepoints, + num_codepoints, + sizeof(hb_codepoint_t)); +} + /** * hb_set_add_range: * @set: A set @@ -591,3 +614,28 @@ hb_set_previous_range (const hb_set_t *set, { return set->previous_range (first, last); } + +/** + * hb_set_next_many: + * @set: A set + * @codepoint: Outputting codepoints starting after this one. + * Use #HB_SET_VALUE_INVALID to get started. + * @out: (array length=size): An array of codepoints to write to. + * @size: The maximum number of codepoints to write out. + * + * Finds the next element in @set that is greater than @codepoint. Writes out + * codepoints to @out, until either the set runs out of elements, or @size + * codepoints are written, whichever comes first. + * + * Return value: the number of values written. + * + * Since: 4.2.0 + **/ +unsigned int +hb_set_next_many (const hb_set_t *set, + hb_codepoint_t codepoint, + hb_codepoint_t *out, + unsigned int size) +{ + return set->next_many (codepoint, out, size); +} -- cgit v1.2.3