mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
we love all our groups
This commit is contained in:
1 parent
692f86e569
commit
a5713bc2cb
1 file changed
+2
-5
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user