Open vitorsr opened 1 month ago
Reproduced the error. The problem is the UFO conversion in tx
.
In the OTF’s name table, nameID 0 is
<namerecord nameID="0" platformID="1" platEncID="0" langID="0x0" unicode="True">
(URW)++,Copyright 2014 by (URW)++ Design & Development
</namerecord>
tx
converts that to
<key>copyright</key>
<string>Copyright (URW)++,Copyright 2014 by (URW)++ Design & Development</string>
<key>trademark</key>
<string>(URW)++,Copyright 2014 by (URW)++ Design & Development</string>
which is invalid XML 🤦♂️ – that ampersand needs to stay &
To reproduce:
tx -ufo NimbusSans-Regular.otf
open NimbusSans-Regular.otf/fontinfo.plist
Thanks, @frankrolf.
Yes, reserved characters have to be replaced by their respective entity references.
This also affects Bigelow & Holmes fonts:
<key>copyright</key>
<string>Copyright (C) 1993 Bigelow & Holmes Inc. All rights reserved.</string>
<key>trademark</key>
<string>Lucida is a registered trademark of Bigelow & Holmes Inc.</string>
I made a local fix that handles these, but it's not a real solution right now because it doesn't cover all possible situations. Maybe we can throw it in anyway and go from there.
I think because of unescaped XML reserved markup characters.
MWE:
Traceback:
Here is
/tmp/tmpm0gs8peg/font.ufo/fontinfo.plist
: