[ot] Add TODO re zero-len MultipleSubst sequences

pull/43/merge
Behdad Esfahbod 11 years ago
parent f1a72fe7bf
commit b6b304f12b
  1. 9
      src/hb-ot-layout-gsub-table.hh
  2. 4
      src/hb-ot-layout-gsubgpos-private.hh

@ -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. */

Loading…
Cancel
Save