diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc index 2a6a439003..8cc64af014 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-normalize.cc @@ -197,16 +197,17 @@ static inline void decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest) { hb_buffer_t * const buffer = c->buffer; + hb_codepoint_t u = buffer->cur().codepoint; hb_codepoint_t glyph; /* Kind of a cute waterfall here... */ - if (shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph)) + if (shortest && c->font->get_glyph (u, 0, &glyph)) next_char (buffer, glyph); - else if (decompose (c, shortest, buffer->cur().codepoint)) + else if (decompose (c, shortest, u)) skip_char (buffer); - else if (!shortest && c->font->get_glyph (buffer->cur().codepoint, 0, &glyph)) + else if (!shortest && c->font->get_glyph (u, 0, &glyph)) next_char (buffer, glyph); - else if (decompose_compatibility (c, buffer->cur().codepoint)) + else if (decompose_compatibility (c, u)) skip_char (buffer); else next_char (buffer, glyph); /* glyph is initialized in earlier branches. */ @@ -289,6 +290,8 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, hb_buffer_t *buffer, hb_font_t *font) { + _hb_buffer_assert_unicode_vars (buffer); + hb_ot_shape_normalization_mode_t mode = plan->shaper->normalization_preference; const hb_ot_shape_normalize_context_t c = { plan, |