[aat] More adjustment to ContextualSubtable
See comment. With this, MORX-20 passes if I turn --verify off. Our unsafe-to-break logic is currently broken in presence of end-of-text actions. That's, ugh, extra work to fix. Let me try...
This commit is contained in:
parent
8be596f0b7
commit
89b1906d99
|
@ -198,6 +198,7 @@ struct ContextualSubtable
|
||||||
|
|
||||||
inline driver_context_t (const ContextualSubtable *table) :
|
inline driver_context_t (const ContextualSubtable *table) :
|
||||||
ret (false),
|
ret (false),
|
||||||
|
mark_set (false),
|
||||||
mark (0),
|
mark (0),
|
||||||
last_zero_before_mark (0),
|
last_zero_before_mark (0),
|
||||||
subs (table+table->substitutionTables) {}
|
subs (table+table->substitutionTables) {}
|
||||||
|
@ -207,6 +208,11 @@ struct ContextualSubtable
|
||||||
{
|
{
|
||||||
hb_buffer_t *buffer = driver->buffer;
|
hb_buffer_t *buffer = driver->buffer;
|
||||||
|
|
||||||
|
/* Looks like CoreText applies neither mark nor current substitution for
|
||||||
|
* end-of-text if mark was not explicitly set. */
|
||||||
|
if (buffer->idx == buffer->len && !mark_set)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (entry->data.markIndex != 0xFFFF)
|
if (entry->data.markIndex != 0xFFFF)
|
||||||
{
|
{
|
||||||
const Lookup<GlyphID> &lookup = subs[entry->data.markIndex];
|
const Lookup<GlyphID> &lookup = subs[entry->data.markIndex];
|
||||||
|
@ -235,6 +241,7 @@ struct ContextualSubtable
|
||||||
|
|
||||||
if (entry->flags & SetMark)
|
if (entry->flags & SetMark)
|
||||||
{
|
{
|
||||||
|
mark_set = true;
|
||||||
mark = buffer->idx;
|
mark = buffer->idx;
|
||||||
last_zero_before_mark = driver->last_zero;
|
last_zero_before_mark = driver->last_zero;
|
||||||
}
|
}
|
||||||
|
@ -245,6 +252,7 @@ struct ContextualSubtable
|
||||||
public:
|
public:
|
||||||
bool ret;
|
bool ret;
|
||||||
private:
|
private:
|
||||||
|
bool mark_set;
|
||||||
unsigned int mark;
|
unsigned int mark;
|
||||||
unsigned int last_zero_before_mark;
|
unsigned int last_zero_before_mark;
|
||||||
const UnsizedOffsetListOf<Lookup<GlyphID>, HBUINT32> &subs;
|
const UnsizedOffsetListOf<Lookup<GlyphID>, HBUINT32> &subs;
|
||||||
|
|
Loading…
Reference in New Issue