提交 b6b304f1 编写于 作者: B Behdad Esfahbod

[ot] Add TODO re zero-len MultipleSubst sequences

上级 f1a72fe7
......@@ -270,6 +270,15 @@ struct Sequence
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY (this);
/* TODO:
* Testing shows that Uniscribe actually allows zero-len susbstitute,
* which essentially deletes a glyph. We don't allow for now. It
* can be confusing to the client since the cluster from the deleted
* glyph won't be merged with any output cluster... Also, currently
* buffer->move_to() makes assumptions about this too. Perhaps fix
* in the future after figuring out what to do with the clusters.
*/
if (unlikely (!substitute.len)) return TRACE_RETURN (false);
unsigned int klass = _hb_glyph_info_is_ligature (&c->buffer->cur()) ?
......
......@@ -995,7 +995,9 @@ static inline bool apply_lookup (hb_apply_context_t *c,
/* Recursed lookup changed buffer len. Adjust. */
/* end can't go back past the current match position. */
/* end can't go back past the current match position.
* Note: this is only true because we do NOT allow MultipleSubst
* with zero sequence len. */
end = MAX ((int) match_positions[idx] + 1, int (end) + delta);
unsigned int next = idx + 1; /* next now is the position after the recursed lookup. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册