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,7 +89,12 @@ class NameRecord:
|
|||||||
])
|
])
|
||||||
writer.newline()
|
writer.newline()
|
||||||
if self.platformID == 0 or (self.platformID == 3 and self.platEncID in (0, 1)):
|
if self.platformID == 0 or (self.platformID == 3 and self.platEncID in (0, 1)):
|
||||||
writer.write16bit(self.string)
|
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:
|
else:
|
||||||
writer.write8bit(self.string)
|
writer.write8bit(self.string)
|
||||||
writer.newline()
|
writer.newline()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user