[ttx] Always add raw=True attribute when dumping DefaultTable to XML
Needed to avoid surprises when we add new table implementations. Recently we added VDMX table, and that broke build of projects using VDMX with DefaultTable, eg: https://github.com/behdad/fonttools/issues/151
This commit is contained in:
parent
bfe99090ba
commit
aeeb884b4c
@ -307,10 +307,13 @@ class TTFont(object):
|
||||
if tag not in self:
|
||||
return
|
||||
xmlTag = tagToXML(tag)
|
||||
attrs = dict()
|
||||
if hasattr(table, "ERROR"):
|
||||
writer.begintag(xmlTag, ERROR="decompilation error")
|
||||
else:
|
||||
writer.begintag(xmlTag)
|
||||
attrs['ERROR'] = "decompilation error"
|
||||
from .tables.DefaultTable import DefaultTable
|
||||
if table.__class__ == DefaultTable:
|
||||
attrs['raw'] = True
|
||||
writer.begintag(xmlTag, **attrs)
|
||||
writer.newline()
|
||||
if tag in ("glyf", "CFF "):
|
||||
table.toXML(writer, self, progress)
|
||||
|
Loading…
x
Reference in New Issue
Block a user