[aat] In ContextualSubtable, mark mark after substituting mark
Fixes MORX-21.
This commit is contained in:
parent
fe5f9b1ae3
commit
aed32589af
|
@ -207,13 +207,7 @@ struct ContextualSubtable
|
|||
{
|
||||
hb_buffer_t *buffer = driver->buffer;
|
||||
|
||||
if (entry->flags & SetMark)
|
||||
{
|
||||
mark = buffer->idx;
|
||||
last_zero_before_mark = driver->last_zero;
|
||||
}
|
||||
|
||||
if (entry->data.markIndex != 0xFFFF)
|
||||
if (entry->data.markIndex != 0xFFFF && mark < buffer->len)
|
||||
{
|
||||
const Lookup<GlyphID> &lookup = subs[entry->data.markIndex];
|
||||
hb_glyph_info_t *info = buffer->info;
|
||||
|
@ -225,7 +219,7 @@ struct ContextualSubtable
|
|||
ret = true;
|
||||
}
|
||||
}
|
||||
if (entry->data.currentIndex != 0xFFFF)
|
||||
if (entry->data.currentIndex != 0xFFFF && buffer->idx < buffer->len)
|
||||
{
|
||||
const Lookup<GlyphID> &lookup = subs[entry->data.currentIndex];
|
||||
hb_glyph_info_t *info = buffer->info;
|
||||
|
@ -238,6 +232,12 @@ struct ContextualSubtable
|
|||
}
|
||||
}
|
||||
|
||||
if (entry->flags & SetMark)
|
||||
{
|
||||
mark = buffer->idx;
|
||||
last_zero_before_mark = driver->last_zero;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue