workaround for odd-length unicode strings (!)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@126 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
fc99ad1513
commit
6d925f5b9a
@ -89,6 +89,11 @@ class NameRecord:
|
||||
])
|
||||
writer.newline()
|
||||
if self.platformID == 0 or (self.platformID == 3 and self.platEncID in (0, 1)):
|
||||
if len(self.string) % 2:
|
||||
# no, shouldn't happen, but some of the Apple
|
||||
# tools cause this anyway :-(
|
||||
writer.write16bit(self.string + "\0")
|
||||
else:
|
||||
writer.write16bit(self.string)
|
||||
else:
|
||||
writer.write8bit(self.string)
|
||||
|
Loading…
x
Reference in New Issue
Block a user