[_g_l_y_f] use short empty element notation for glyf instructions

This commit is contained in:
Cosimo Lupo 2017-01-24 18:33:57 +00:00
parent 0918f7cf3e
commit 3c46a4280f
No known key found for this signature in database
GPG Key ID: B61AAAD0B53A6419

View File

@ -371,10 +371,13 @@ class Glyph(object):
writer.newline()
haveInstructions = self.numberOfContours > 0
if haveInstructions:
writer.begintag("instructions")
writer.newline()
self.program.toXML(writer, ttFont)
writer.endtag("instructions")
if self.program:
writer.begintag("instructions")
writer.newline()
self.program.toXML(writer, ttFont)
writer.endtag("instructions")
else:
writer.simpletag("instructions")
writer.newline()
def fromXML(self, name, attrs, content, ttFont):