Fix parsing of hinting instructions that end in a PUSHB
Sounds useless, but MReifutaiM-Regular.ttf seems to have that, and the
parsing back from XML was failing because we expected a token whereas
after dropping whitespace there wasn't any left.
diff --git a/Lib/fontTools/ttLib/tables/ttProgram.py b/Lib/fontTools/ttLib/tables/ttProgram.py
index 0863c29..647386e 100644
--- a/Lib/fontTools/ttLib/tables/ttProgram.py
+++ b/Lib/fontTools/ttLib/tables/ttProgram.py
@@ -300,8 +300,8 @@
push(op)
else:
args = []
+ pos = skipWhite(assembly, pos)
while pos < lenAssembly:
- pos = skipWhite(assembly, pos)
m = _tokenRE.match(assembly, pos)
if m is None:
raise tt_instructions_error, "Syntax error in TT program (%s)" % assembly[pos:pos+15]
@@ -309,6 +309,7 @@
if number is None and comment is None:
break
pos = m.regs[0][1]
+ pos = skipWhite(assembly, pos)
if comment is not None:
continue
args.append(int(number))