Closed RoelN closed 3 years ago
Good catch, all segment-based subtable formats should be checking to verify the segment doesn't simply mean "end of segments, nothing here".
I feel like we solved this previously, can you test to see if this is still the case @RoelN ?
Just tested, but 0xffff
is still reported as a character, so at Wakamai Fondue we still need to account for that.
if you have a reproducible case for it, I can add that as a test - if you want to drop some code in a comment, we can see if this happens on any of the Source Code or Open Sans fonts and get it added to the test set.
fixed in https://github.com/Pomax/Font.js/commit/495ec044a6aa35d23961c136adad61e316a59929, specifically, by testing for surrogate and noncharacter codes: https://github.com/Pomax/Font.js/commit/495ec044a6aa35d23961c136adad61e316a59929#diff-1496abdd1291c189b17f8168f8363662ad0df7697af702539e98e3a1a3023178R91-R103
As the last
start
/end
combination, getSupportedCharCodes returns{start: 65535, end: 65535}
. This appears to be the Unicode character for "not a Unicode character".The fonts tested do not have a character defined at
0xffff
.