[Debg] in toXML, dump the JSON as multi-line string with indentation

the table is for debugging, so let's make it easier for human-beings to read its content when dumped to TTX
This commit is contained in:
Cosimo Lupo 2023-10-26 14:56:09 +01:00
parent 541c6cd201
commit 92cbfee0d0
No known key found for this signature in database
GPG Key ID: DF65A8A5A119C9A8

View File

@ -11,7 +11,7 @@ class table_D__e_b_g(DefaultTable.DefaultTable):
return json.dumps(self.data).encode("utf-8") return json.dumps(self.data).encode("utf-8")
def toXML(self, writer, ttFont): def toXML(self, writer, ttFont):
writer.writecdata(json.dumps(self.data)) writer.writecdata(json.dumps(self.data, indent=2))
def fromXML(self, name, attrs, content, ttFont): def fromXML(self, name, attrs, content, ttFont):
self.data = json.loads(content) self.data = json.loads(content)