diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index 69dbec078..cb49705cf 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -74,23 +74,6 @@ * Indic shaper may want to disallow recomposing of two matras. */ -static bool -decompose_unicode (const hb_ot_shape_normalize_context_t *c, - hb_codepoint_t ab, - hb_codepoint_t *a, - hb_codepoint_t *b) -{ - return (bool) c->unicode->decompose (ab, a, b); -} - -static bool -compose_unicode (const hb_ot_shape_normalize_context_t *c, - hb_codepoint_t a, - hb_codepoint_t b, - hb_codepoint_t *ab) -{ - return (bool) c->unicode->compose (a, b, ab); -} static inline void set_glyph (hb_glyph_info_t &info, hb_font_t *font) @@ -313,8 +296,8 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, font, buffer->unicode, buffer->not_found, - plan->shaper->decompose ? plan->shaper->decompose : decompose_unicode, - plan->shaper->compose ? plan->shaper->compose : compose_unicode + plan->shaper->decompose ? plan->shaper->decompose : hb_ot_shape_normalize_context_t::decompose_unicode, + plan->shaper->compose ? plan->shaper->compose : hb_ot_shape_normalize_context_t::compose_unicode }; bool always_short_circuit = mode == HB_OT_SHAPE_NORMALIZATION_MODE_NONE; diff --git a/src/hb-ot-shape-normalize.hh b/src/hb-ot-shape-normalize.hh index 12c78a235..7474d544e 100644 --- a/src/hb-ot-shape-normalize.hh +++ b/src/hb-ot-shape-normalize.hh @@ -28,6 +28,7 @@ #define HB_OT_SHAPE_NORMALIZE_HH #include "hb.hh" +#include "hb-unicode.hh" /* buffer var allocations, used during the normalization process */ @@ -52,6 +53,24 @@ HB_INTERNAL void _hb_ot_shape_normalize (const hb_ot_shape_plan_t *shaper, struct hb_ot_shape_normalize_context_t { + static bool + decompose_unicode (const hb_ot_shape_normalize_context_t *c, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b) + { + return (bool) c->unicode->decompose (ab, a, b); + } + + static bool + compose_unicode (const hb_ot_shape_normalize_context_t *c, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab) + { + return (bool) c->unicode->compose (a, b, ab); + } + const hb_ot_shape_plan_t *plan; hb_buffer_t *buffer; hb_font_t *font; diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index 06a88e720..c999d400c 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc @@ -531,7 +531,7 @@ _remap_colrv1_delta_set_index_indices (const OT::DeltaSetIndexMap &index_map, unsigned var_idx = index_map.map (delta_set_idx); unsigned new_varidx = HB_OT_LAYOUT_NO_VARIATIONS_INDEX; int delta = 0; - + if (var_idx != HB_OT_LAYOUT_NO_VARIATIONS_INDEX) { hb_pair_t *new_varidx_delta;