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.

[varLib.featureVars] lookups for 'rvrn' should probably be inserted at the beginning

See original GitHub issue

It turns out Apple messed up the implementation of rvrn: despite the spec saying it should be processed early, it follows the lookup order.

https://twitter.com/justvanrossum/status/1345364798423363584

So fonts built with designspace rules saying <rules processing="first"> (which use the rvrn feature), behave like <rules processing="last"> on macOS (at least on 10.15).

We should probably work around that by inserting the rvrn lookups before all other lookups.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
arrowtypecommented, Apr 19, 2021

there’s nothing I can do about the previous behavior for users that don’t update

@nedley Thanks for your input! I’m not sure if this was directed at me, but I am still primarily using Catalina. Just to clarify, though, I’ve tested this on the latest version of macOS (v 11.2, released Feb 1, 2021) and Safari on iOS 14.4.2 (v14.4.2, released March 26, 2021), and I have confirmed that if the rvrn lookups are ordered later than the stylistic set lookups, the rvrn substitutions don’t occur before stylistic set substitutions. Unless, are you saying that the behavior has been fixed in more-recent versions of Mac or iOS? (Also, am I mistaken in thinking that iOS Safari uses CoreText? I’m genuinely unsure about whether that is the case, or whether WebKit uses its own text layout engine.)

Here’s a screenshot of TextEdit, showing the problem. ss20 should mean that the I g l glyphs get subbed for .text versions at smaller opsz values, as they do in HarfBuzz (e.g. in FontGoggles, screenshot below).

image

(Also checked at actual sizes < 24)

image

The same font works as expected in FontGoggles:

image

If the lookups are reordered (e.g. by the process shown in my video, above), things do start to work as intended. For comparison, you can see these two deployments of a non-working vs working version of these rvrn-dependent stylistic sets. How to use: open the “Options” sidebar, then add ss20, and then move the opsz slider up and down. In the latter test, you will see glyphs I g l swapping at opsz 24.

If it’s helpful to have these for local testing, you can find them in browser Dev Tools > Network file view of the respective web pages.


Update: I’ve tested this in the latest macOS general release, 11.2.3, and the issue persists.

1reaction
nedleycommented, Apr 6, 2021

CoreText has always applied rvrn early (along with other mandatory features) but not super-early; this has been fixed but there’s nothing I can do about the previous behavior for users that don’t update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simplify auto-variation alts & stylistic sets? · Issue #35 · arrowtype ...
[varLib.featureVars] lookups for 'rvrn' should probably be inserted at the beginning fonttools/fonttools#2140 · https://twitter.com/ArrowType/status/ ...
Read more >
Just van Rossum on Twitter: "@ArrowType Also: https://t.co ...
[varLib.featureVars] lookups for 'rvrn' should probably be inserted at the beginning · Issue #2140... It turns out Apple messed up the implementation of ......
Read more >
NEWS.rst - platform/external/fonttools - Git at Google
[varLib.interpolatable] Added checks for contour node count and operation type ... [featureVars] Avoid duplicate references to ``rvrn`` feature record in.
Read more >
fonttools [python-library] - Occam :: Details
This command will install fonttools, as well as the optional dependencies that are ... [varLib] Added support for building, reading, writing and optimizing ......
Read more >
https://mirrors.aliyun.com/android.googlesource.co...
[docs] Added a terminology section for varLib (#2209). ... [featureVars] Avoid duplicate references to ``rvrn`` feature record in ``DefaultLangSys`` tables ...
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