Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mti2fea parsing issue #1

Open
jbmorizot opened this issue Mar 27, 2020 · 0 comments
Open

mti2fea parsing issue #1

jbmorizot opened this issue Mar 27, 2020 · 0 comments

Comments

@jbmorizot
Copy link
Contributor

jbmorizot commented Mar 27, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant