diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index a384d1f18..0b77919be 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -551,7 +551,7 @@ hb_buffer_reverse_clusters (hb_buffer_t *buffer) hb_codepoint_t u; \ const T *old_next = next; \ next = UTF_NEXT (next, end, u); \ - hb_buffer_add_glyph (buffer, u, 0, old_next - (const T *) text); \ + hb_buffer_add_glyph (buffer, u, 1, old_next - (const T *) text); \ } \ } HB_STMT_END diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh index 81e18d485..cb66aec74 100644 --- a/src/hb-ot-layout-gpos-private.hh +++ b/src/hb-ot-layout-gpos-private.hh @@ -1535,7 +1535,7 @@ struct PosLookup : Lookup while (buffer->i < buffer->len) { bool done; - if (~buffer->info[buffer->i].mask & mask) + if (buffer->info[buffer->i].mask & mask) { done = apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL); ret |= done; diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh index 828c45825..96c1c9caa 100644 --- a/src/hb-ot-layout-gsub-private.hh +++ b/src/hb-ot-layout-gsub-private.hh @@ -830,7 +830,7 @@ struct SubstLookup : Lookup buffer->i = 0; while (buffer->i < buffer->len) { - if ((~buffer->info[buffer->i].mask & mask) && + if ((buffer->info[buffer->i].mask & mask) && apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL)) ret = true; else @@ -846,7 +846,7 @@ struct SubstLookup : Lookup buffer->i = buffer->len - 1; do { - if ((~buffer->info[buffer->i].mask & mask) && + if ((buffer->info[buffer->i].mask & mask) && apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL)) ret = true; else