diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index f7b354705..b9834ca10 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -68,12 +68,19 @@ * matra for the Indic shaper. */ +static inline void +set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode) +{ + info->general_category() = hb_unicode_general_category (unicode, info->codepoint); + info->combining_class() = _hb_unicode_modified_combining_class (unicode, info->codepoint); +} + static void output_glyph (hb_font_t *font, hb_buffer_t *buffer, hb_codepoint_t glyph) { buffer->output_glyph (glyph); - hb_glyph_info_set_unicode_props (&buffer->out_info[buffer->out_len - 1], buffer->unicode); + set_unicode_props (&buffer->out_info[buffer->out_len - 1], buffer->unicode); } static bool @@ -262,7 +269,7 @@ _hb_ot_shape_normalize (hb_font_t *font, hb_buffer_t *buffer, { /* Composes. Modify starter and carry on. */ buffer->out_info[starter].codepoint = composed; - hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer->unicode); + set_unicode_props (&buffer->out_info[starter], buffer->unicode); buffer->skip_glyph (); continue; diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index 8685ece5b..5fc69b11f 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh @@ -47,19 +47,10 @@ struct hb_ot_shape_plan_t -static inline void -hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode) -{ - info->general_category() = hb_unicode_general_category (unicode, info->codepoint); - info->combining_class() = _hb_unicode_modified_combining_class (unicode, info->codepoint); -} - HB_INTERNAL hb_bool_t _hb_ot_shape (hb_font_t *font, hb_buffer_t *buffer, const hb_feature_t *features, unsigned int num_features); -#include "hb-ot-shape-complex-private.hh" - #endif /* HB_OT_SHAPE_PRIVATE_HH */ diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index f5f9fd3ac..d21559cd2 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -169,12 +169,19 @@ hb_ot_shape_setup_masks (hb_ot_shape_context_t *c) /* Prepare */ +static inline void +set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode) +{ + info->general_category() = hb_unicode_general_category (unicode, info->codepoint); + info->combining_class() = _hb_unicode_modified_combining_class (unicode, info->codepoint); +} + static void hb_set_unicode_props (hb_buffer_t *buffer) { unsigned int count = buffer->len; for (unsigned int i = 0; i < count; i++) - hb_glyph_info_set_unicode_props (&buffer->info[i], buffer->unicode); + set_unicode_props (&buffer->info[i], buffer->unicode); } static void