[aat] Fix unsafe-to-break marking when end-of-text action kicks in
The state we are dealing with here is the previous state; so it should cause unsafe_to_break before current glyph. I'm surprised this wasn't caught by any tests. Guess we don't have any fonts with fancy end-of-text forms.
This commit is contained in:
parent
aa80c7c8b4
commit
7b8a8adb7d
|
@ -766,11 +766,11 @@ struct StateTableDriver
|
|||
}
|
||||
|
||||
/* Unsafe-to-break if end-of-text would kick in here. */
|
||||
if (buffer->idx + 2 <= buffer->len)
|
||||
if (buffer->backtrack_len () && buffer->idx < buffer->len)
|
||||
{
|
||||
const Entry<EntryData> &end_entry = machine.get_entry (state, StateTable<Types, EntryData>::CLASS_END_OF_TEXT);
|
||||
if (c->is_actionable (this, end_entry))
|
||||
buffer->unsafe_to_break (buffer->idx, buffer->idx + 2);
|
||||
buffer->unsafe_to_break_from_outbuffer (buffer->backtrack_len () - 1, buffer->idx + 1);
|
||||
}
|
||||
|
||||
c->transition (this, entry);
|
||||
|
|
Loading…
Reference in New Issue