From a5713bc2cb4a3fd71d3bc94b9f155339b09eb71a Mon Sep 17 00:00:00 2001 From: Rod Sheeter Date: Mon, 12 Feb 2018 11:30:45 -0800 Subject: [PATCH] we love all our groups --- src/hb-ot-cmap-table.hh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index c338371fd..b3a7b8b8e 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -528,18 +528,15 @@ struct cmap CmapSubtableLongGroup *group = nullptr; for (unsigned int i = 0; i < codepoints.len; i++) { hb_codepoint_t cp = codepoints[i]; - if (!group) + if (!group || cp - 1 != group->endCharCode) { group = groups->push(); group->startCharCode.set(cp); group->endCharCode.set(cp); group->glyphID.set(i); // index in codepoints is new gid - } else if (cp -1 == group->endCharCode) - { - group->endCharCode.set(cp); } else { - group = nullptr; + group->endCharCode.set(cp); } }