Merge pull request #3096 from timmaffett/fix_ttx_urlencode_filenames

fix ttx split tables option to work on filenames containing '%' fixes #3095
This commit is contained in:
Cosimo Lupo 2023-05-02 11:53:19 +01:00 committed by GitHub
commit f026853cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,12 +323,11 @@ class TTFont(object):
writer.newline()
else:
path, ext = os.path.splitext(writer.filename)
fileNameTemplate = path + ".%s" + ext
for i in range(numTables):
tag = tables[i]
if splitTables:
tablePath = fileNameTemplate % tagToIdentifier(tag)
tablePath = path + "." + tagToIdentifier(tag) + ext
tableWriter = xmlWriter.XMLWriter(
tablePath, newlinestr=writer.newlinestr
)