提交 c8cfb702 编写于 作者: B Behdad Esfahbod

[cmap] Minor

上级 1dcf5fb0
...@@ -292,11 +292,13 @@ struct CmapSubtableFormat4 ...@@ -292,11 +292,13 @@ struct CmapSubtableFormat4
} }
inline void collect_unicodes (hb_set_t *out) const inline void collect_unicodes (hb_set_t *out) const
{ {
for (unsigned int i = 0; i < this->segCount; i++) unsigned int count = this->segCount;
if (count && this->startCount[count - 1] == 0xFFFFu)
count--; /* Skip sentinel segment. */
for (unsigned int i = 0; i < count; i++)
{ {
/* XXX This does NOT skip over chars mapping to gid0... */ /* XXX This does NOT skip over chars mapping to gid0... */
if (this->startCount[i] != 0xFFFFu || this->endCount[i] != 0xFFFFu) // Skip the last segment (0xFFFF) out->add_range (this->startCount[i], this->endCount[i]);
out->add_range (this->startCount[i], this->endCount[i]);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册