From 645f4e7cdd874bd454fceec76b33e57c0a205775 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Fri, 3 May 2019 18:28:18 -0400 Subject: [PATCH] Unhide CGJ before ccc=0 characters If a CGJ precedes a starter, then it cannot have blocked any reordering, so it can safely be skipped. --- src/hb-ot-shape-normalize.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index 50b5829c4..9157c066f 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -408,7 +408,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan, */ for (unsigned int i = 1; i + 1 < buffer->len; i++) if (buffer->info[i].codepoint == 0x034Fu/*CGJ*/ && - info_cc(buffer->info[i-1]) <= info_cc(buffer->info[i+1])) + (info_cc(buffer->info[i+1]) == 0 || info_cc(buffer->info[i-1]) <= info_cc(buffer->info[i+1]))) { _hb_glyph_info_unhide (&buffer->info[i]); }