[_g_l_y_f/ttProgram] Move writer.newline() to Program.toXML()

This commit is contained in:
Cosimo Lupo 2017-01-24 13:58:34 +00:00
parent 828a58aacb
commit 499bc960f9
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419
2 changed files with 3 additions and 2 deletions

View File

@ -358,7 +358,6 @@ class Glyph(object):
writer.begintag("instructions")
writer.newline()
self.program.toXML(writer, ttFont)
writer.newline()
writer.endtag("instructions")
writer.newline()
else:
@ -379,7 +378,6 @@ class Glyph(object):
writer.begintag("instructions")
writer.newline()
self.program.toXML(writer, ttFont)
writer.newline()
writer.endtag("instructions")
writer.newline()

View File

@ -246,6 +246,7 @@ class Program(object):
writer.newline()
writer.dumphex(self.getBytecode())
writer.endtag("bytecode")
writer.newline()
else:
writer.begintag("assembly")
writer.newline()
@ -279,11 +280,13 @@ class Program(object):
if _indentRE.match(instr):
indent += 1
writer.endtag("assembly")
writer.newline()
else:
writer.begintag("bytecode")
writer.newline()
writer.dumphex(self.getBytecode())
writer.endtag("bytecode")
writer.newline()
def fromXML(self, name, attrs, content, ttFont):
if name == "assembly":