glifLib: writeGlyphToString must include the xml declaration
This is a regression from ufoLib v2.1.1, see https://github.com/adobe-type-tools/afdko/pull/462#issuecomment-403577134 https://travis-ci.org/adobe-type-tools/afdko/jobs/401751859#L8427
This commit is contained in:
parent
d01c383fe9
commit
8ad8f7631c
@ -628,7 +628,10 @@ def writeGlyphToString(glyphName, glyphObject=None, drawPointsFunc=None, formatV
|
||||
_writeLib(glyphObject, root, validate)
|
||||
# return the text
|
||||
tree = etree.ElementTree(root)
|
||||
text = etree.tostring(root, encoding=unicode, pretty_print=True)
|
||||
data = etree.tostring(
|
||||
root, encoding="utf-8", xml_declaration=True, pretty_print=True
|
||||
)
|
||||
text = data.decode("utf-8")
|
||||
return text
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user