[fealib] lookup flag ignored if it's declared before a script statement
See original GitHub issueIn the following lookup, the lookup flag will be ignored which is different from FDK. In FDK it’s not ignored.
lookup rlig_arab_0 {
lookupflag RightToLeft IgnoreMarks;
script arab;
sub arAlef arLamPF.i arLamPF.m arHehPF.f by arAllah;
} rlig_arab_0;
But if I move the flag after the script statement, it will be taken:
lookup rlig_arab_0 {
script arab;
lookupflag RightToLeft IgnoreMarks;
sub arAlef arLamPF.i arLamPF.m arHehPF.f by arAllah;
} rlig_arab_0;
This is not a major issue as long as the user knows about this difference. I had a situation that I couldn’t find an explanation why my lookup flag is ignored in fontmake but not in makeotf.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
fonttools/parser.py at main - GitHub
A library to manipulate font files from Python. Contribute to fonttools/fonttools development by creating an account on GitHub.
Read more >feaLib: Read/write OpenType feature files - fontTools
fontTools' feaLib allows for the creation and parsing of Adobe Font Development Kit for OpenType feature ( .fea ) files. The syntax of...
Read more >Diff - 3aedd105d78b03a1821e6b20f5ad8f096fa49c7a^! - platform ...
This flag indicates whether the substitution rules should be applied before or after other glyph substitution features. -- If no ``processing`` attribute is ......
Read more >Introduction to OpenType Programming
As mentioned above, any lookups which appear before the first script keyword in a setting are considered to apply to all scripts and...
Read more >afdko - PyPI
The AFDKO is a set of tools for building OpenType font files from PostScript and TrueType font data. ... [tx] ufowrite for loop...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/fonttools/fonttools/pull/1883 should fix the output to match makeotf’s, but note that the first rlig lookup will still have its lookup flags reset (in both makeotf and feaLib) because the current script is different from the new one. Since all lookups in your rlig feature use the same script, you should set it outside the lookup blocks instead (also
RightToLeft
has effect only on cursive attachment lookups, it is ignored by layout engines for all other lookups, so you don’t need to set it).Sorry for the delay, I got the files, and I checked what makeotf is doing, but got distracted. Will make a PR soon.