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

[ds5] Cannot generate static TTF #64

Open
roberto-arista opened this issue Jul 19, 2023 · 2 comments
Open

[ds5] Cannot generate static TTF #64

roberto-arista opened this issue Jul 19, 2023 · 2 comments

Comments

@roberto-arista
Copy link
Contributor

Hey @typemytype,
I tried to generate some static TTFs from a designspace and I got the following traceback:

******************************
Traceback (most recent call last):
  File "/Users/robertoarista/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/batchTools.py", line 109, in runTask_
    self._callback(progress=self._progress, **self._kwargs)
  File "/Users/robertoarista/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/batchGenerate/__init__.py", line 146, in run
    result = font.generate(path=path, format=format,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/lib/fontObjects/fontPartsWrappers.py", line 2046, in generate
    return super(RFont, self).generate(format=format, path=path, **environmentOptions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/lib/python3.11/site-packages/fontParts/base/font.py", line 367, in generate
    return self._generate(
           ^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/lib/fontObjects/fontPartsWrappers.py", line 2130, in _generate
    return self.naked().generate(path=path, format=_format, **environmentOptions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/lib/fontObjects/doodleFont.py", line 294, in generate
    return self.layers.defaultLayer.generate(path, format, decompose, checkOutlines, autohint,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/lib/fontObjects/doodleLayer.py", line 364, in generate
    result = fontCompilerGenerateFont(self.font, options, outputPath=path, format=format, decompose=decompose,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/fontCompiler/compiler.py", line 149, in generateFont
    reports = compiler.compile(outputFont, options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/fontCompiler/baseCompiler.py", line 360, in compile
    partsCompiler = self._makeFDKParts(font, options, partsPath, report)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/fontCompiler/ttfCompiler.py", line 549, in _makeFDKParts
    return super()._makeFDKParts(font, options, partsPath, report)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/fontCompiler/baseCompiler.py", line 419, in _makeFDKParts
    partsCompiler.compile()
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/lib/python3.11/site-packages/ufo2fdk/makeotfParts.py", line 93, in compile
    self.setupFile_outlineSource(self.paths["outlineSource"])
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/lib/python3.11/site-packages/ufo2fdk/makeotfParts.py", line 107, in setupFile_outlineSource
    c = self.outlineCompilerClass(self.font, path, self.glyphOrder)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/fontCompiler/baseCompiler.py", line 177, in __init__
    missingRequiredGlyphs = self.makeMissingRequiredGlyphs()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/roboFont.source/robofont/fontCompiler/baseCompiler.py", line 201, in makeMissingRequiredGlyphs
    ascender = _roundInt(getAttrWithFallback(font.info, "ascender"))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robertoarista/Documents/Repositories/RF_virtualApp/roboFont.test/lib/python3.11/site-packages/ufo2fdk/fontInfoData.py", line 545, in getAttrWithFallback
    value = staticFallbackData[attr]
            ~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'ascender'

******************************

I can provide some data if it's useful.

@roberto-arista roberto-arista changed the title Cannot generate static TTF [ds5] Cannot generate static TTF Jul 19, 2023
@typemytype
Copy link
Owner

is this still an issue?

batch is adding the minimal required font info attributes here https://github.com/typemytype/batchRoboFontExtension/blob/ds5/Batch.roboFontExt/lib/batchGenerators/batchTools.py#L24

@typemytype
Copy link
Owner

is this is still an issue? if so could you share the designspace and ufos?

thanks!!

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

2 participants