From becd84aa2f2902ea9d2d1677b28945e103a68816 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 11 Sep 2018 01:26:18 +0200 Subject: [PATCH] Add HB_FEATURE_GLOBAL_START/END Fixes https://github.com/harfbuzz/harfbuzz/issues/1141 New API: HB_FEATURE_GLOBAL_START HB_FEATURE_GLOBAL_END --- docs/harfbuzz-sections.txt | 2 ++ src/hb-common.cc | 4 ++-- src/hb-common.h | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index ca0e908fe..b69c16860 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -582,6 +582,8 @@ hb_set_union
hb-shape +HB_FEATURE_GLOBAL_END +HB_FEATURE_GLOBAL_START hb_feature_t hb_feature_from_string hb_feature_to_string diff --git a/src/hb-common.cc b/src/hb-common.cc index ed3fed2a3..c1651232a 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -877,8 +877,8 @@ parse_feature_indices (const char **pp, const char *end, hb_feature_t *feature) bool has_start; - feature->start = 0; - feature->end = (unsigned int) -1; + feature->start = HB_FEATURE_GLOBAL_START; + feature->end = HB_FEATURE_GLOBAL_END; if (!parse_char (pp, end, '[')) return true; diff --git a/src/hb-common.h b/src/hb-common.h index 5dc1ebcd2..fdceff9dc 100644 --- a/src/hb-common.h +++ b/src/hb-common.h @@ -379,6 +379,19 @@ typedef void (*hb_destroy_func_t) (void *user_data); /* Font features and variations. */ +/** + * HB_FEATURE_GLOBAL_START + * + * Since: REPLACEME + */ +#define HB_FEATURE_GLOBAL_START 0 +/** + * HB_FEATURE_GLOBAL_END + * + * Since: REPLACEME + */ +#define HB_FEATURE_GLOBAL_END ((unsigned int) -1) + typedef struct hb_feature_t { hb_tag_t tag; uint32_t value;