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

Build issues to debug for v1.086 #530

Open
arrowtype opened this issue Jan 7, 2024 · 5 comments
Open

Build issues to debug for v1.086 #530

arrowtype opened this issue Jan 7, 2024 · 5 comments

Comments

@arrowtype
Copy link
Owner

Following my own build instructions, I run into issues in prepping the variable font build:

Traceback (most recent call last):
  File "/Users/stephennixon/type-repos/recursive/mastering/build.py", line 5, in <module>
    from build_files import buildFiles, getFolders
  File "/Users/stephennixon/type-repos/recursive/mastering/build_files.py", line 4, in <module>
    from prep_fonts import prep, copyFiles
  File "/Users/stephennixon/type-repos/recursive/mastering/prep_fonts.py", line 6, in <module>
    from designspaceProblems import DesignSpaceChecker
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/designspaceProblems/__init__.py", line 10, in <module>
    from ufoProcessor.ufoOperator import UFOOperator
ModuleNotFoundError: No module named 'ufoProcessor.ufoOperator'
Traceback (most recent call last):
  File "/Users/stephennixon/type-repos/recursive/mastering/build.py", line 5, in <module>
    from build_files import buildFiles, getFolders
  File "/Users/stephennixon/type-repos/recursive/mastering/build_files.py", line 4, in <module>
    from prep_fonts import prep, copyFiles
  File "/Users/stephennixon/type-repos/recursive/mastering/prep_fonts.py", line 6, in <module>
    from designspaceProblems import DesignSpaceChecker
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/designspaceProblems/__init__.py", line 10, in <module>
    from ufoProcessor.ufoOperator import UFOOperator
ModuleNotFoundError: No module named 'ufoProcessor.ufoOperator'

I’ll debug it and keep notes here.

@arrowtype
Copy link
Owner Author

Okay, that first issue was solved by pip installing ufoProcessor directly from its repo.

Now, onto new issues!

@arrowtype
Copy link
Owner Author

Current blocker:

version=1.086 # (replace version number)                    
python build.py --varfiles --version $version
python build.py --variable --version $version
🚚 Building files for mastering

🚚 Generating sources
🏗  Copying files
🏗  Opening sources
🏗  Checking family name
🏗  Removing non-exporting glyphs
🏗  Decomposing scaled, flipped, and nested components
🏗  Clearing guides
🏗  Removing glyphs that aren't in every font
🏗  Removing non-compatible glyphs
🏗  Making kerning compatible
🏗  Sorting glyph order to be common
🏗  Setting production names
🏗  Setting version
🏗  Closing and saving sources
🏗  Checking full design space
🏗  Writing report
✅ Done preparing sources
🏗  Moved features into UFOs
🏗  Added mark, mkmk, and GDEF to features
Exception ignored in: <function UFOOperator.__del__ at 0x107390900>
Traceback (most recent call last):
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/ufoProcessor/ufoOperator.py", line 485, in __del__
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/ufoProcessor/ufoOperator.py", line 490, in changed
AttributeError: 'NoneType' object has no attribute 'keys'
🏗  Constructing variable font
Traceback (most recent call last):
  File "/Users/stephennixon/type-repos/recursive/mastering/build.py", line 66, in <module>
    build_variable(designspacePath=files["designspace"],
  File "/Users/stephennixon/type-repos/recursive/mastering/build_variable.py", line 147, in build_variable
    fp.build_variable_font(designspacePath,
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontmake/font_project.py", line 298, in build_variable_font
    font = ufo2ft.compileVariableTTF(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/ufo2ft/__init__.py", line 597, in compileVariableTTF
    fonts = compileVariableTTFs(designSpaceDoc, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/ufo2ft/__init__.py", line 663, in compileVariableTTFs
    vfNameToTTFont = varLib.build_many(
                     ^^^^^^^^^^^^^^^^^^
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/__init__.py", line 1120, in build_many
    vf = build(
         ^^^^^^
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/__init__.py", line 1209, in build
    _merge_OTL(vf, model, master_fonts, axisTags)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/__init__.py", line 758, in _merge_OTL
    merger.mergeTables(font, master_fonts, ["GSUB", "GDEF", "GPOS"])
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 156, in mergeTables
    self.mergeThings(font[tag], [m.get(tag) for m in master_ttfs])
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 1245, in mergeThings
    super(VariationMerger, self).mergeThings(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 143, in mergeThings
    self.mergeObjects(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 114, in mergeObjects
    mergerFunc(self, value, values)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 1245, in mergeThings
    super(VariationMerger, self).mergeThings(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 143, in mergeThings
    self.mergeObjects(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 114, in mergeObjects
    mergerFunc(self, value, values)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 1245, in mergeThings
    super(VariationMerger, self).mergeThings(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 143, in mergeThings
    self.mergeObjects(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 114, in mergeObjects
    mergerFunc(self, value, values)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 1245, in mergeThings
    super(VariationMerger, self).mergeThings(out, lst)
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/fontTools/varLib/merger.py", line 148, in mergeThings
    raise ShouldBeConstant(self, expected=out, got=lst)
fontTools.varLib.errors.ShouldBeConstant: 

Couldn't merge the fonts, because some values were different, but should have
been the same. This happened while performing the following operation:
GPOS.table.FeatureList.FeatureCount

The problem is likely to be in Recursive Mono Casual A Slanted:
Expected to see .FeatureCount==5, instead saw 3

Incompatible features between masters.
Expected: kern, kern, kern, mark, mkmk.
Got: kern, mark, mkmk.

In the varfontprep-report.txt, there is a line saying that kerning is different... This is what I’ll investigate next.

[kerning: kerning group does not match / public.kern1.H_right: ['H', 'Hbrevebelow', 'Hcircumflex', 'Hdotbelow', 'N', 'Nacute', 'Ncaron', 'Ncommaaccent', 'Ndot', 'Ndotbelow', 'Nlinebelow', 'Ntilde', 'U', 'Uacute', 'Ubreve', 'Ucircumflex', 'Udieresis', 'Udotbelow', 'Ugrave', 'Ugravedbl', 'Uhook', 'Uhorn', 'Uhornacute', 'Uhorndot', 'Uhorngrave', 'Uhornhook', 'Uhorntilde', 'Uhungarumlaut', 'Uinvertedbreve', 'Umacron', 'Umacrondieresis', 'Uogonek', 'Uring', 'Utilde', 'Utildeacute', 'Eng', 'LJ', 'NJ', 'Nhookleft', 'd', 'ddotbelow', 'dlinebelow'], ['H', 'Hbrevebelow', 'Hcircumflex', 'Hdotbelow', 'N', 'Nacute', 'Ncaron', 'Ncommaaccent', 'Ndot', 'Ndotbelow', 'Nlinebelow', 'Ntilde', 'U', 'Uacute', 'Ubreve', 'Ucircumflex', 'Udieresis', 'Udotbelow', 'Ugrave', 'Ugravedbl', 'Uhook', 'Uhorn', 'Uhornacute', 'Uhorndot', 'Uhorngrave', 'Uhornhook', 'Uhorntilde', 'Uhungarumlaut', 'Uinvertedbreve', 'Umacron', 'Umacrondieresis', 'Uogonek', 'Uring', 'Utilde', 'Utildeacute', 'Eng', 'LJ', 'NJ', 'Nhookleft', 'd', 'ddotbelow', 'dlinebelow', 'one.sans'], font: Recursive Sans Casual B, groupName: public.kern1.H_right (5, 2)]

@arrowtype
Copy link
Owner Author

Well, I’m not yet sure how to get past this, so it’ll take more digging.

I think the solution may lie in understanding and fixing this early part of the above traceback:

🏗  Added mark, mkmk, and GDEF to features
Exception ignored in: <function UFOOperator.__del__ at 0x107390900>
Traceback (most recent call last):
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/ufoProcessor/ufoOperator.py", line 485, in __del__
  File "/Users/stephennixon/type-repos/recursive/venv/lib/python3.11/site-packages/ufoProcessor/ufoOperator.py", line 490, in changed
AttributeError: 'NoneType' object has no attribute 'keys'

@arrowtype arrowtype changed the title Build issues caused by older dependencies. (designspaceProblems and/or UFOOperator?) Build issues to debug for v1.086 Jan 8, 2024
@arrowtype
Copy link
Owner Author

Another possible issue causing the build failure is detailed at googlefonts/fontmake#894.

Basically, ufo2ft now splits kerning by script, and the Sans sources for Recursive have kerning for /pi and other Greek characters. I’ll try adding some blank kerns for Greek into the Mono sources, and see whether that makes a difference here.

Also, re: "In the varfontprep-report.txt, there is a line saying that kerning is different... This is what I’ll investigate next." I see that the second font in that list includes one.sans in the list. So, I’ll set groups to be the same, again.

@arrowtype
Copy link
Owner Author

Adding blank kerning to mono sources for /pi /pi actually did help, but didn't fully solve things:

Couldn't merge the fonts, because some values were different, but should have
been the same. This happened while performing the following operation:
GPOS.table.FeatureList.FeatureCount

The problem is likely to be in Recursive Mono Casual A Slanted:
Expected to see .FeatureCount==5, instead saw 4

Incompatible features between masters.
Expected: kern, kern, kern, mark, mkmk.
Got: kern, kern, mark, mkmk.

Next, I’ll debug the ufoOperator traceback.

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

No branches or pull requests

1 participant