I'm trying to connect marks with cursive attachments in two combinations: mark to mark + cursive or mark to mark to mark + cursive.
In my test font, Bar, ABC and abc are marks while efg are cursive attachments.
Font Creator's rendering engine (above) fooled me into thinking my code works. (The above result is what I need.)
But exporting the view in a web browser (below) reveals quite differently.
Is Font Creator incorrectly exporting this font, or is my code faulty? If I'm at fault, could any of you point me in the right direction?
To be clear, I don't have the liberty of changing what's assigned as marks and what's assigned as cursive attachments. Otherwise, I would have set all the glyphs in question as cursive attachments and called it a day.
Code is attached below if that helps.
Thank you
Code: Select all
script latn {
feature MarkToMarkPositioning1;
}
class @ABC_mk [A.mk-C.mk];
class @abc_mk [a.mk-c.mk];
class @ABC [A-C];
class @abc [a-c];
class @def [d-f];
feature MarkToMarkPositioning1 mkmk {
lookup MarkToMark1;
lookup MarkToMark2;
lookup CursiveAttachment1;
lookup ChainingContext1;
}
lookup MarkToMark1 {
anchor Anchor_1;
mark A.mk 0 0;
mark B.mk 0 0;
mark C.mk 0 0;
pos mark bar mark 800 -950;
}
lookup MarkToMark2 {
anchor Anchor_1;
mark a.mk 0 0;
mark b.mk 0 0;
mark c.mk 0 0;
pos mark A.mk mark 1300 0;
pos mark B.mk mark 1300 0;
pos mark C.mk mark 1350 0;
}
lookup CursiveAttachment1 {
cursive d entry 0 0;
cursive e entry 0 0;
cursive f entry 0 0;
cursive d exit 1200 0;
cursive e exit 1200 0;
cursive f exit 750 0;
cursive a.mk exit 1100 0;
cursive b.mk exit 1250 0;
cursive c.mk exit 1100 0;
cursive A exit 1300 0;
cursive B exit 1000 0;
cursive C exit 1000 0;
cursive A.mk exit 1300 0;
cursive B.mk exit 1300 0;
cursive C.mk exit 1300 0;
}
lookup ChainingContext1 {
context (bar @ABC_mk) @abc;
sub 0 SingleSubstitution1;
context (bar @ABC_mk) @abc (@def);
sub 0 SingleSubstitution1;
context (bar) @ABC;
sub 0 SingleSubstitution1;
context (bar) @ABC (@def);
sub 0 SingleSubstitution1;
}
lookup SingleSubstitution1 {
sub @ABC -> @ABC_mk;
sub @abc -> @abc_mk;
}