提交 7810bb1a 编写于 作者: S Sascha Brawer 提交者: Behdad Esfahbod

[morx] Only insert glyphs at mark when a mark has been set before

This reverts commit f4072e8c.
https://github.com/harfbuzz/harfbuzz/issues/1195
上级 5de2d9cd
...@@ -592,6 +592,7 @@ struct InsertionSubtable ...@@ -592,6 +592,7 @@ struct InsertionSubtable
hb_aat_apply_context_t *c_) : hb_aat_apply_context_t *c_) :
ret (false), ret (false),
c (c_), c (c_),
mark_set (false),
mark (0), mark (0),
insertionAction (table+table->insertionAction) {} insertionAction (table+table->insertionAction) {}
...@@ -607,7 +608,7 @@ struct InsertionSubtable ...@@ -607,7 +608,7 @@ struct InsertionSubtable
hb_buffer_t *buffer = driver->buffer; hb_buffer_t *buffer = driver->buffer;
unsigned int flags = entry->flags; unsigned int flags = entry->flags;
if (entry->data.markedInsertIndex != 0xFFFF) if (entry->data.markedInsertIndex != 0xFFFF && mark_set)
{ {
unsigned int count = (flags & MarkedInsertCount); unsigned int count = (flags & MarkedInsertCount);
unsigned int start = entry->data.markedInsertIndex; unsigned int start = entry->data.markedInsertIndex;
...@@ -668,7 +669,10 @@ struct InsertionSubtable ...@@ -668,7 +669,10 @@ struct InsertionSubtable
} }
if (flags & SetMark) if (flags & SetMark)
{
mark_set = true;
mark = buffer->out_len; mark = buffer->out_len;
}
return true; return true;
} }
...@@ -677,6 +681,7 @@ struct InsertionSubtable ...@@ -677,6 +681,7 @@ struct InsertionSubtable
bool ret; bool ret;
private: private:
hb_aat_apply_context_t *c; hb_aat_apply_context_t *c;
bool mark_set;
unsigned int mark; unsigned int mark;
const UnsizedArrayOf<GlyphID> &insertionAction; const UnsizedArrayOf<GlyphID> &insertionAction;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册