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.

kern pairs between Arabic numerals missing from kern feature

See original GitHub issue

The kerning.plist in the UFOs generated from noto-source/NotoSansArabic-MM.glyphs only contains kerning pairs between Arabic numerals. These are written left-to-right, have special bidirectional class “AN”. Our _glyphIsRtl method correctly return False. So these kern pairs are not moved to the RTL kern lookup.

The problem is the current KernFeatureWriter doesn’t output any kerning for them, not even in the LTR kern lookup…

I believe it has to do with this commit, whereby we only output LTR lookup if the ltrScripts list is not empty, or if the latter is empty and the rtlScripts list is empty: https://github.com/googlei18n/ufo2ft/commit/9757f20ceb21c06dec5fdfddc361ea1cc30499a4

But the font’s features.fea has languagesytem DFLT dftl; languagesystem arab dflt;, so the ltrScripts list is empty and rtlScripts is non empty.

This is also related: https://github.com/googlei18n/ufo2ft/issues/112

I’ll follow up with a failing test case

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
khaledhosnycommented, Jan 18, 2018

Also, lookupflag RightToLeft; has no effect on pairwise or any kind of lookup other than cursive attachments where it determines the order of start and end anchors.

1reaction
behdadcommented, Jan 19, 2018

I definitely want to fix HarfBuzz to do similar to Uniscribe. But I want everyone to understand the issue completely: the LTR kern pair for digits GO INTO THE RTL KERNING TABLE! That’s the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto-generated kern feature could have wrong languagesystems ...
A good implementation of a kern feature writer would recreate the list of ... kern pairs between Arabic numerals missing from kern feature...
Read more >
Features, part 1: simple substitutions - Glyphs App
OpenType features can do two things: substitute glyphs and reposition glyphs. ... You will notice that the ligature inherits the kerning groups of...
Read more >
Advanced Typography Tables - FontForge
Two examples of features are 'kern' which provides kerning information between pairs of glyphs and 'init' which will transform one set of glyphs...
Read more >
Kerning and tracking in InDesign - Adobe Support
Optical kerning adjusts the spacing between adjacent characters based on their shapes, and is optimized for use with Roman glyphs. Some fonts ...
Read more >
Developing OpenType Fonts for Arabic Script - Typography
Kerning. Apply feature 'kern' to provide pair kerning between base glyphs requiring adjustment for better typographical quality.
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