8000 AttributeError when compiling font with fvar/gvar · Issue #797 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
AttributeError when compiling font with fvar/gvar #797
Closed
@RoelN

Description

@RoelN

I created a font with i-can-variable-font, dumped it to a .ttx file, and tried to compile it back to a font without any changes. I then get the error AttributeError: ('Item', 'VarData[0]', 'VarStore'):

~/code/i-can-variable-font/example messing-around★  20:08:36
➤ ttx varibox-VF.ttf
Dumping "varibox-VF.ttf" to "varibox-VF.ttx"...
Dumping 'GlyphOrder' table...
Dumping 'head' table...
Dumping 'hhea' table...
Dumping 'maxp' table...
Dumping 'OS/2' table...
Dumping 'hmtx' table...
Dumping 'cmap' table...
Dumping 'loca' table...
Dumping 'glyf' table...
Dumping 'name' table...
Dumping 'post' table...
Dumping 'GDEF' table...
Dumping 'GPOS' table...
Dumping 'fvar' table...
Dumping 'gvar' table...
~/code/i-can-variable-font/example messing-around★  20:08:43
➤ ttx varibox-VF.ttx
Compiling "varibox-VF.ttx" to "varibox-VF#1.ttf"...
Parsing 'GlyphOrder' table...
Parsing 'head' table...
Parsing 'hhea' table...
Parsing 'maxp' table...
Parsing 'OS/2' table...
Parsing 'hmtx' table...
Parsing 'cmap' table...
Parsing 'loca' table...
Parsing 'glyf' table...
Parsing 'name' table...
Parsing 'post' table...
Parsing 'GDEF' table...
Parsing 'GPOS' table...
Parsing 'fvar' table...
Parsing 'gvar' table...
ERROR: Unhandled exception has occurred
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttx.py", line 398, in main
    process(jobs, options)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttx.py", line 372, in process
    action(input, output, options)
  File "/usr/local/lib/python2.7/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttx.py", line 293, in ttCompile
    ttf.save(output)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/__init__.py", line 216, in save
    self._writeTable(tag, writer, done)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/__init__.py", line 654, in _writeTable
    tabledata = self.getTableData(tag)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/__init__.py", line 665, in getTableData
    return self.tables[tag].compile(self)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otBase.py", line 90, in compile
    self.table.compile(writer, font)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otBase.py", line 674, in compile
    conv.write(writer, font, table, value)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otConverters.py", line 391, in write
    value.compile(subWriter, font)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otBase.py", line 649, in compile
    conv.write(writer, font, table, value, i)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otConverters.py", line 391, in write
    value.compile(subWriter, font)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otBase.py", line 623, in compile
    table = self.preWrite(font)
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otTables.py", line 209, in preWrite
    for item in self.Item:
  File "/usr/local/lib/python2.7/site-packages/fontTools/ttLib/tables/otBase.py", line 557, in __getattr__
    raise AttributeError(attr)
AttributeError: ('Item', 'VarData[0]', 'VarStore')
~/code/i-can-variable-font/example messing-around★  20:08:53
➤

I don't know if the font is broken, even though it seems to work fine and decompiles fine. I opened an issue at their repo in case this is not a TTX/FontTools issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0