This PR adds lookup type 6. This is a way for fonts to look before and after the character as it were. For instance, the frac layout feature is usually a type 6 lookup that basically works like this:
If there's a slash, see if there's a number before it, see if there's a number after it. If so, exchange these characters by these glyphs.
In the case of a fraction like 1/2, the 1 would be changed into superscript 1, the slash optionally for a different designed slash, and the 2 for a subscript 2, making a ½
In this example, the slash is the input, the 1 is the backtrack, and the 2 is the lookahead.
This PR exposes the input, backtrack and lookhead so an interface can figure out how to display it.
Thanks for the extensive reviews, @pascalw. Like discussed offline, I'll merge this now so we can go ahead with the beta, and either improve things in a new PR, or create issues to keep track of them!
This PR adds lookup type 6. This is a way for fonts to look before and after the character as it were. For instance, the
frac
layout feature is usually a type 6 lookup that basically works like this:In the case of a fraction like
1/2
, the 1 would be changed into superscript 1, the slash optionally for a different designed slash, and the 2 for a subscript 2, making a ½In this example, the slash is the
input
, the1
is the backtrack, and the2
is the lookahead.This PR exposes the input, backtrack and lookhead so an interface can figure out how to display it.