Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two phantom points show unexpected movement in glyphs with intermediate masters #198

Closed
Lorp opened this issue Sep 9, 2020 · 3 comments
Closed

Comments

@Lorp
Copy link

Lorp commented Sep 9, 2020

I noticed when playing with SourceSansVariable-Roman.ttf and SourceSansVariable-Italic.ttf in Samsa (Version 3.006 for both fonts) that, in some glyphs, two of the phantom points have unexpected movement through the variation range of the wght axis.

To replicate the issue, go to Samsa, load Source Sans, either Roman or Italic, then enable point numbers in the UI panel. Then select the D glyph using the Glyphs panel. Now move the wght axis slider from the minimum position to the maximum position. You will see two points 24 and 25 superimposed at at (0,0) at wght 200, then by wght 600 the points have moved together to (0,550), then by wght 900 then have moved back to (0,0). This movement serves no purpose that I can see.

These two points are the second pair of phantom points, and they represent the vertical equivalent of lsb and advance width.

The issue affects all Latin caps that have an intermediate master, i.e. D, H, M, N, O, T, W, Y. The issue may well affect many more glyphs.

20200909 Samsa Source Sansa D wght 200
20200909 Samsa Source Sansa D wght 600
20200909 Samsa Source Sansa D wght 900

@josh-hadley
Copy link

Thanks for reporting this @Lorp . I did some analysis on the v3.006 font and indeed there are many glyphs, all with intermediate masters, where there's a (0, 550) variation on the Top and Bottom phantom points. I also looked at v3.028 fonts and I see the same problem, except that the variation on Top & Bottom phantoms is (0, -40). This is definitely not intentional and I agree that they serve no purpose. We're investigating how these got introduced into the TT VFs.

@josh-hadley
Copy link

josh-hadley commented Nov 6, 2020

We looked into this a bit more and thanks to a nice subsetted test font from @frankrolf we discovered that the cause of the unexpected deltas on the Top & Bottom phantom points is that the intermediate master font's hhea.ascent differs from the other masters (intermediate is 984, versus 1024 for the others, in the v3.028 version). Combined with the way varLib/fontTools obtains the phantom point coordinates when the TT VF is built (with fontmake), it results in a delta on the intermediate equal to the difference in hhea.ascent values.

So for this case, the fix will be to adjust the intermediate master's hhea.ascent. With the fontmake workflow, there are other possible workarounds (add a 'vmtx' table) that are better suited for other projects.

Thanks again for calling this to our attention, @Lorp!

@Lorp
Copy link
Author

Lorp commented Nov 7, 2020

Glad to help. Good to hear the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants