[subset] Don't assume the last segment in cmap 4 can be skipped, actually check it.
This commit is contained in:
parent
21a181af2b
commit
39754fb659
|
@ -130,9 +130,13 @@ struct CmapSubtableFormat4
|
||||||
static inline void get_all_codepoints_func (const void *obj, hb_set_t *out)
|
static inline void get_all_codepoints_func (const void *obj, hb_set_t *out)
|
||||||
{
|
{
|
||||||
const accelerator_t *thiz = (const accelerator_t *) obj;
|
const accelerator_t *thiz = (const accelerator_t *) obj;
|
||||||
for (unsigned int i = 0; i < thiz->segCount - 1; i++) // Skip the last segment (0xFFFF)
|
for (unsigned int i = 0; i < thiz->segCount; i++)
|
||||||
|
{
|
||||||
|
if (thiz->startCount[i] != 0xFFFFu
|
||||||
|
|| thiz->endCount[i] != 0xFFFFu) // Skip the last segment (0xFFFF)
|
||||||
hb_set_add_range (out, thiz->startCount[i], thiz->endCount[i]);
|
hb_set_add_range (out, thiz->startCount[i], thiz->endCount[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const HBUINT16 *endCount;
|
const HBUINT16 *endCount;
|
||||||
const HBUINT16 *startCount;
|
const HBUINT16 *startCount;
|
||||||
|
|
Loading…
Reference in New Issue