Problem in Chrome?

Opening in Chrome or Edge doesn't display the four different figure sets, but only the default figures. In firefox it is right. Does anyone know more about this issue?

But when an extra gylph is added to Chrome it works....???


  • An explanation here would be that since digits are assigned Common script, Chrome is trying to shape them with DFLT OpenType script and the font does not have lookups under DFLT script. Adding a Latin letter will cause them to be shaped with latn OpenType script. Firefox may be falling to Latin when no script is detected.
  • Erwin DenissenErwin Denissen Posts: 200
    edited November 2018
    Actually the font contains one lookup in the DFLT script (in the Slashed Zero feature), so removing the DFLT script solves the issue.

    I'll add this inconsistent behaviour between web browsers in this forum post:

    Microsoft Edge has a similar issue.

  • I'm not done testing yet, but it seems dat DFLT is needed. FiraSans works fine and has this code:

    feature lnum { # Lining Figures
     # Latin
        sub @lnum1 by @lnum2;
     language AZE ; # Azeri
     language AFK ; # Afrikaans
     language PLK ; # Polish
     language TRK ; # Turkish
     language MOL ; # Moldavian
     language ROM ; # Romanian
     language CAT ; # Catalan
     language TAT ; # Tatar
     language CRT ; # Crimean Tatar
     language KAZ ; # Kazakh
     script DFLT; # DEFAULT
        sub @lnum1 by @lnum2;
     script grek; # Greek
        sub @lnum1 by @lnum2;
     script cyrl; # Cyrillic
        sub @lnum1 by @lnum2;
    } lnum;

  • I think the feature code misses script latn;

    feature zero {
    	language dflt;
    Should be:
    feature zero {
    script latn;
    language dflt;

  • If you have any feature that is using ‘script latn’, then all other features need to be registered for ‘dflt’ and ‘latn’.

    you can do that like this

    feature xxxx {
      lookup xxxx_a {
        sub a by b;
      } xxxx_a;

      script latn;
      lookup xxxx_a;
    } xxxx;

  • George. I just now noticed your reply. Thank you very much!
Sign In or Register to comment.