Merge pull request #3031 from CourtBouillon/main

[sbix] Fix UnboundLocalError: cannot access local variable 'rawdata' where
This commit is contained in:
Cosimo Lupo 2023-03-10 10:59:54 +00:00 committed by GitHub
commit 48bf4d4eed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ class Glyph(object):
# (needed if you just want to compile the sbix table on its own)
self.gid = struct.pack(">H", ttFont.getGlyphID(self.glyphName))
if self.graphicType is None:
self.rawdata = b""
rawdata = b""
else:
rawdata = sstruct.pack(sbixGlyphHeaderFormat, self)
if self.graphicType == "dupe":