[glyf] compile empty table as 1 null byte to make OTS and Windows happy
Fixes #899 See https://github.com/khaledhosny/ots/issues/52#issuecomment-289369267
This commit is contained in:
parent
16bff17483
commit
9c7ceadc0e
@ -122,6 +122,12 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
|
||||
ttFont['loca'].set(locations)
|
||||
if 'maxp' in ttFont:
|
||||
ttFont['maxp'].numGlyphs = len(self.glyphs)
|
||||
if not data:
|
||||
# As a special case when all glyph in the font are empty, add a zero byte
|
||||
# to the table, so that OTS doesn’t reject it, and to make the table work
|
||||
# on Windows as well.
|
||||
# See https://github.com/khaledhosny/ots/issues/52
|
||||
data = b"\0"
|
||||
return data
|
||||
|
||||
def toXML(self, writer, ttFont, splitGlyphs=False):
|
||||
|
Loading…
x
Reference in New Issue
Block a user