typemytype / batchRoboFontExtension

25 stars 9 forks source link

openTypeGaspRangeRecords reference, deserialize lib reference #14

Closed djrrb closed 7 years ago

djrrb commented 8 years ago

Trying to generate variable fonts using Batch for the first time, and I've hit a couple errors depending on the designspace file (these are designspace files that have worked running directly from fontTools varLib).

First seems like it is a UFO2 vs 3 issue, calling a future info attribute. I am running this in Version 1.7.1b (built 1609082244).

******************************
Traceback (most recent call last):
  File "/Users/david/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/batchTools.py", line 123, in runTask_
  File "/Users/david/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/variableFontGenerator/__init__.py", line 59, in run
  File "/Users/david/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/batchTools.py", line 282, in generateVariationFont
  File "/Users/david/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/batchTools.py", line 267, in process
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/mutatorMath/ufo/document.py", line 407, in process
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/mutatorMath/ufo/document.py", line 562, in readInstances
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/mutatorMath/ufo/document.py", line 638, in _readSingleInstanceElement
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/mutatorMath/ufo/document.py", line 700, in readInfoElement
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/mutatorMath/ufo/instance.py", line 212, in addInfo
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/mutatorMath/ufo/instance.py", line 228, in _copyFontInfo
AttributeError: 'Info' object has no attribute 'openTypeGaspRangeRecords'

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

Oddly enough I tried to run this in my copy of RoboFont Version 2.0b (built 1609082301), but I can't find Batch in the menu, even after exiting safe mode.

screen shot 2016-10-12 at 9 01 08 am

The second error has to do with the lib:

Traceback (most recent call last):
  File "/Users/david/Library/Application Support/RoboFont/plugins/Batch.roboFontExt/lib/batchTools.py", line 415, in _generateVariationFont
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/fontCompiler/compiler.py", line 125, in generateFont
  File "/Applications/FontApps/RoboFont.app/Contents/Resources/lib/python2.7/fontCompiler/compiler.py", line 162, in prepareCompile
AttributeError: 'Lib' object has no attribute 'deserialize'

The designspace file does contain a <lib copy="1" /> tag in one of the sources, and there's nothing besides the usual "com.typemytype....." inside that lib.

Thanks so much for implementing this, and let me know if you want me to send designspace files or if I can offer anything else!

typemytype commented 7 years ago

Please close this issue if everything works as aspected

djrrb commented 7 years ago

I don’t remember which designspace I was running this on, so I’m just going to close it and will reopen if I find further issues. Thanks! :-D