Problem with ttx/fonttools: turning ttx back into ttf
Martin Wenzel
Posts: 48
I have a problem turning ttx back into ttf (ttf to ttx works ). Even if I'm not changing anything in the ttx file there is a problem compiling the ttf from it. Does anyone know what the issue might be? Help would be very much appreciated.
Issue seems to be related to "PUSHB",
ValueError: too many values to unpack
Parsing 'fpgm' table...
Traceback (most recent call last):
File "/usr/local/bin/ttx", line 11, in <module>
ttx.main(sys.argv[1:])
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttx.py", line 310, in main
process(jobs, options)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttx.py", line 295, in process
action(input, output, options)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttx.py", line 216, in ttCompile
ttf.importXML(input, quiet=options.quiet)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/__init__.py", line 342, in importXML
reader.read()
File "/Library/Python/2.7/site-packages/FontTools/fontTools/misc/xmlReader.py", line 30, in read
self._parseFile(file)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/misc/xmlReader.py", line 49, in _parseFile
parser.Parse(chunk, 0)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/misc/xmlReader.py", line 115, in _endElementHandler
self.currentTable.fromXML(name, attrs, content, self.ttFont)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/tables/_f_p_g_m.py", line 22, in fromXML
program.fromXML(name, attrs, content, ttFont)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py", line 264, in fromXML
self._assemble()
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py", line 351, in _assemble
op, argBits = streamMnemonicDict["PUSHB"]
ValueError: too many values to unpack
Issue seems to be related to "PUSHB",
ValueError: too many values to unpack
Parsing 'fpgm' table...
Traceback (most recent call last):
File "/usr/local/bin/ttx", line 11, in <module>
ttx.main(sys.argv[1:])
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttx.py", line 310, in main
process(jobs, options)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttx.py", line 295, in process
action(input, output, options)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttx.py", line 216, in ttCompile
ttf.importXML(input, quiet=options.quiet)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/__init__.py", line 342, in importXML
reader.read()
File "/Library/Python/2.7/site-packages/FontTools/fontTools/misc/xmlReader.py", line 30, in read
self._parseFile(file)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/misc/xmlReader.py", line 49, in _parseFile
parser.Parse(chunk, 0)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/misc/xmlReader.py", line 115, in _endElementHandler
self.currentTable.fromXML(name, attrs, content, self.ttFont)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/tables/_f_p_g_m.py", line 22, in fromXML
program.fromXML(name, attrs, content, ttFont)
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py", line 264, in fromXML
self._assemble()
File "/Library/Python/2.7/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py", line 351, in _assemble
op, argBits = streamMnemonicDict["PUSHB"]
ValueError: too many values to unpack
0
Comments
-
What version of foottools do you have? We changed something about his to days ago. And it seems I forgot to commit a few lines of code. I just fixed it, it will be live soon.0
-
Hi Georg, I've tried various (under Mac OS 10.9.5). The thing is that it did work fine two days ago. Could you pin point me to where I'd need to go to get the fixed version?
https://github.com/behdad/fonttools ?
(I've just now reinstalled all the contents (including fonttools of course) from RoboFab_599, from here http://download.robofab.com/ but that does not work either, same problem, related I guess)
0 -
Martin, is the problem related to one particular ttf? One possible workaround could be to only output the tables you want to change by using ttx -t <table>, and then merge them into the ttf again.0
-
This is fixed now. Please get the latest version from GitHub.0
-
Georg, thanks, it’s working again.
Paul, thanks for your input, that would have been a possible option.
0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports