You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 main issues for translating MTI files with mti2fea.py: 1. The lookups are not listed in the correct order.
When the rules are not applied in the right order, a substitution supposed to be applied on a glyph, (or a chain of glyphs) that is given by a previous rules won't be done. So one need to reorder it by hand (and it prevents full automatization of the parsing). 2. But most important, mti files use a "syntax" that is not supported in Adobe OT features : a succession of multiple lookups applied on an input in "chained lookup".
In Adobe features you're only allowed to have one lookup applied on a context. So after parsing the mti file, you need to read the rules, understand what the successive lookups are doing (because the lookups called can work on different parts of the context), and create a new lookup that achieve this in one row, and then call only this context in the rule of the "chained lookup".
Ex: pos @backtrackgrp1 @backtrackgrp2 @inputgrp1' @inputgrp2' lookup Reph_subst @lookaheadgrp1;
is correct,
but: pos @backtrackgrp1 @backtrackgrp2 @inputgrp1' @inputgrp2' lookup Reph_subst lookup Reva lookup other_subst @lookaheadgrp1;
will not work. MTI files use it because it's very powerful to deal with complex shaping.
The trick is that sometimes these complex rules call other chained lookups, that call chained lookup, and it can become quite complex to track what's going on.
The text was updated successfully, but these errors were encountered:
There are 2 main issues for translating MTI files with mti2fea.py:
1. The lookups are not listed in the correct order.
When the rules are not applied in the right order, a substitution supposed to be applied on a glyph, (or a chain of glyphs) that is given by a previous rules won't be done. So one need to reorder it by hand (and it prevents full automatization of the parsing).
2. But most important, mti files use a "syntax" that is not supported in Adobe OT features : a succession of multiple lookups applied on an input in "chained lookup".
In Adobe features you're only allowed to have one lookup applied on a context. So after parsing the mti file, you need to read the rules, understand what the successive lookups are doing (because the lookups called can work on different parts of the context), and create a new lookup that achieve this in one row, and then call only this context in the rule of the "chained lookup".
Ex:
pos @backtrackgrp1 @backtrackgrp2 @inputgrp1' @inputgrp2' lookup Reph_subst @lookaheadgrp1;
is correct,
but:
pos @backtrackgrp1 @backtrackgrp2 @inputgrp1' @inputgrp2' lookup Reph_subst lookup Reva lookup other_subst @lookaheadgrp1;
will not work. MTI files use it because it's very powerful to deal with complex shaping.
The trick is that sometimes these complex rules call other chained lookups, that call chained lookup, and it can become quite complex to track what's going on.
The text was updated successfully, but these errors were encountered: