Skip remaining characters after IndexError

This commit is contained in:
Andrew Murray 2022-06-22 16:55:33 +10:00
parent f160e698a1
commit db741bf25f

View File

@ -241,8 +241,10 @@ class PcfFontFile(FontFile.FontFile):
] ]
if encoding_offset != 0xFFFF: if encoding_offset != 0xFFFF:
encoding[i] = encoding_offset encoding[i] = encoding_offset
except (UnicodeDecodeError, IndexError): except UnicodeDecodeError:
# character is not supported in selected encoding # character is not supported in selected encoding
pass pass
except IndexError:
break
return encoding return encoding