As discussed at https://github.com/khaledhosny/ots/pull/238#issuecomment-1002750392.
Note that the root cause is that there is no PrivateDICT at all (not even an empty one), which is required for CFF2, and that condition was not being checked. So I added a check for that and fail early. In case we still somehow get to ValidateCFFCharStrings and attempt to access vsindex_per_font, I also added a check there to avoid an out-of-range exception. Also updated test suite with the font in question.
As discussed at https://github.com/khaledhosny/ots/pull/238#issuecomment-1002750392. Note that the root cause is that there is no PrivateDICT at all (not even an empty one), which is required for CFF2, and that condition was not being checked. So I added a check for that and fail early. In case we still somehow get to ValidateCFFCharStrings and attempt to access vsindex_per_font, I also added a check there to avoid an out-of-range exception. Also updated test suite with the font in question.