Closed justvanrossum closed 2 years ago
I'll be away a couple of weeks so I hope @madig or @belluzj can take a look on my behalf, they should be able to cut releases of all the libraries involved, including fonttools
(Sorry for the "DS5BreakTest" name: we were assuming it is related to the DS5 work, but that is not actually confirmed by us at this point.)
No worries about the name, we'll have a look! It could be related to the new code to generate names from the STAT data.
@justvanrossum Can I add your DS file as a test case in fontTools? It's indeed the code that makes names for instances on the file that is trying too hard, in this case there's no STAT data at all since it's DS4 and it's still trying to make some postscript names (and failing). We'll fix it in fontTools I believe.
Just FYI the problem can be observed by asking for the instance names using the new DS5 APIs like so:
from fontTools.designspaceLib import DesignSpaceDocument as DS
d = DS.fromfile("DS5BreakTest.designspace")
from fontTools.designspaceLib.statNames import getStatNames
names = getStatNames(d, d.instances[0].location)
StatNames(familyNames={'en': 'DS5BreakTest'}, styleNames={'en': ''}, postScriptFontName='DS5BreakTest-', styleMapFamilyNames={'en': 'DS5BreakTest'}, styleMapStyleName='regular')
Sure. Feel free to strip it further from redundant stuff. This was adapted from a @blackfoundrycom retail font, but I think I removed everything that could be sensitive.
This PR seems to have fixed the issue for us after we're reproduced it locally: https://github.com/fonttools/fonttools/pull/2684
Thanks for the test file!
We've found a regression with ufo2ft 2.28.0, related to the difference in behavior regarding postscript names for named instances.
After setting up a venv with fontmake 3.3.0, I built the two example fonts like this:
And
Sources and built fonts are included in the attached archive. ufo2ft_regression.zip
I pasted the fdiff for fvar and name tables below. It seems the instance PS names aren't computed correctly. Previously, they weren't added at all.
I bet it can be fixed by tweaking the source data (how, though?), but this is a rather nasty breakage for a setup that used to work fine.
Cc. @jeremiehornus