question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[fealib] lookup flag ignored if it's declared before a script statement

See original GitHub issue

In 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:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
khaledhosnycommented, Apr 20, 2020

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).

1reaction
khaledhosnycommented, Feb 19, 2020

Sorry for the delay, I got the files, and I checked what makeotf is doing, but got distracted. Will make a PR soon.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found