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.

ligature seems to not work correctly

See original GitHub issue

Using Zilla-Regular (otf version, found here: https://github.com/mozilla/zilla-slab/tree/master/OTF_release files) on a page with opentypejs shows the font “doing the right thing” with the double slash in Moz://a as a text element, but when obtained through opentype.js, shows incorrect ligature of the // sequence (there should be a ligature, but there isn’t).

Screenshot of a a page with a <p>Moz://a</p> and a canvas with the same string rendered using OpenType.js:

image

Code used:

      opentype.load(ZILLA_FONT_REGULAR, function(err, font) {
        if (err) {
          return console.log(err);
        } else {
          var ctx = document.getElementById('canvas').getContext('2d');
          var path = font.getPath('Moz://a', 0, 150, 72, {
            features: true,
            kern: true
          });
          path.draw(ctx);
        }
      });

(ZILLA_FONT_REGULAR is a data-uri for the font linked to above)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fpirschcommented, Feb 28, 2018

These tables are so complex that, not only are they a nightmare to parse and to write, but nobody seems to use them correctly :-p

1reaction
fpirschcommented, Jun 11, 2017

Hi @fdb and @Jolg42 GPOS lookup 9 and GSUB lookup 7 are actually special extended-offset tables used to break the 32-bit offset limit in big fonts. It is a container for other lookup tables.

Currently, GSUB lookup 7 support is partial (the table is parsed but not used, and not written), and GPOS lookup 9 support is totally absent.

In fact GPOS support was done long ago in a hurry and needs serious refactoring (it is very primitive and inconsistent with what is done for GSUB). I later wrote the GSUB support with this in mind: layout.js, table.js and parser.js are intended to serve both GSUB and GPOS (and GDEF if needed).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get ligatures working correctly in Microsoft Word?
Hello, I am keen to get ligatures like ash (æ) automatically inserted in Microsoft Word when typing words that traditionally require ...
Read more >
Some Cascadia Code (specifically) Ligatures not working ...
Steps to Reproduce: Set Cascadia Code as the font; Enable ligatures ... ^ As you can see here, != is recognised correctly, but...
Read more >
Font ligatures not working - Visual Studio Feedback
I've noticed that the first time I install a font with ligatures, if I start Visual Studio 2019 and choose the font, ligatures...
Read more >
'fj' ligatures are not correctly mapped with 'glyphtounicode ...
But in short, I believe the f in inputs like fb , fk , etc. is mapped to a different f glyph, which...
Read more >
Weird ligature issues - Page 3 - Adobe Support Community
I open the job up the Ligature issue does not happen. ... Seems removing and placing the fonts in and out of the...
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