Merge pull request #2496 from derwind/fix-fontName-in-suckfont

Fix type of fontName in suckfont
This commit is contained in:
Just van Rossum 2022-01-08 19:22:45 +01:00 committed by GitHub
commit e778f2c3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,6 +365,7 @@ def suckfont(data, encoding="ascii"):
m = re.search(br"/FontName\s+/([^ \t\n\r]+)\s+def", data)
if m:
fontName = m.group(1)
fontName = fontName.decode()
else:
fontName = None
interpreter = PSInterpreter(encoding=encoding)