From d753ac78da5619a0a545cdaf7a8e65787e996570 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 9 Aug 2011 14:03:12 +0200 Subject: [PATCH] [uniscribe] Remove zerowidth glyphs from output --- src/hb-uniscribe-shape.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hb-uniscribe-shape.cc b/src/hb-uniscribe-shape.cc index a0020ca..e583ae1 100644 --- a/src/hb-uniscribe-shape.cc +++ b/src/hb-uniscribe-shape.cc @@ -399,9 +399,13 @@ retry: #undef FAIL /* Set glyph infos */ + buffer->len = 0; for (unsigned int i = 0; i < glyphs_len; i++) { - hb_glyph_info_t *info = &buffer->info[i]; + if (glyph_props[i].sva.fZeroWidth) + continue; + + hb_glyph_info_t *info = &buffer->info[buffer->len++]; info->codepoint = glyphs[i]; info->cluster = vis_clusters[i]; @@ -411,7 +415,6 @@ retry: info->var1.u32 = offsets[i].du; info->var2.u32 = offsets[i].dv; } - buffer->len = glyphs_len; /* Set glyph positions */ buffer->clear_positions (); -- 2.7.4