Skip to content

Commit

Permalink
Merge pull request #79 from robotools/ignoreUnkownEncodings
Browse files Browse the repository at this point in the history
ignore unknown encodings
  • Loading branch information
typesupply authored Dec 20, 2024
2 parents ac43f93 + a1ec155 commit 5bed092
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Lib/extractor/formats/opentype.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ def _extractInfoName(source, info):
platformID = record.platformID
encodingID = record.platEncID
languageID = record.langID
string = record.toUnicode()
try:
string = record.toUnicode()
except UnicodeDecodeError:
# ignore font names with unknown encoding
continue
nameIDs[nameID, platformID, encodingID, languageID] = string
records.append(
(
Expand Down

0 comments on commit 5bed092

Please sign in to comment.