diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index a754590dc..a1ad6d7ea 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -145,7 +145,7 @@ decompose_multi_char_cluster (hb_ot_shape_context_t *c, { /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */ for (unsigned int i = c->buffer->idx; i < end; i++) - if (unlikely (is_variation_selector (c->buffer->info[i].codepoint))) { + if (unlikely (_hb_unicode_is_variation_selector (c->buffer->info[i].codepoint))) { while (c->buffer->idx < end) c->buffer->next_glyph (); return; diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index 78564f835..73473772f 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh @@ -90,14 +90,6 @@ struct hb_ot_shape_context_t }; -static inline hb_bool_t -is_variation_selector (hb_codepoint_t unicode) -{ - return unlikely ((unicode >= 0x180B && unicode <= 0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */ - (unicode >= 0xFE00 && unicode <= 0xFE0F) || /* VARIATION SELECTOR-1..16 */ - (unicode >= 0xE0100 && unicode <= 0xE01EF)); /* VARIATION SELECTOR-17..256 */ -} - static inline void hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode) { diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 4275afc82..d61eb75cd 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -205,7 +205,7 @@ hb_map_glyphs (hb_font_t *font, unsigned int count = buffer->len - 1; for (buffer->idx = 0; buffer->idx < count;) { - if (unlikely (is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) { + if (unlikely (_hb_unicode_is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) { hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, buffer->info[buffer->idx + 1].codepoint, &glyph); buffer->replace_glyph (glyph); buffer->skip_glyph (); diff --git a/src/hb-unicode-private.hh b/src/hb-unicode-private.hh index 7fdf646df..ad85be7b9 100644 --- a/src/hb-unicode-private.hh +++ b/src/hb-unicode-private.hh @@ -106,5 +106,13 @@ HB_INTERNAL unsigned int _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs, hb_codepoint_t unicode); +static inline hb_bool_t +_hb_unicode_is_variation_selector (hb_codepoint_t unicode) +{ + return unlikely ((unicode >= 0x180B && unicode <= 0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */ + (unicode >= 0xFE00 && unicode <= 0xFE0F) || /* VARIATION SELECTOR-1..16 */ + (unicode >= 0xE0100 && unicode <= 0xE01EF)); /* VARIATION SELECTOR-17..256 */ +} + #endif /* HB_UNICODE_PRIVATE_HH */