tomolt / libschrift

A lightweight TrueType font rendering library
ISC License
471 stars 32 forks source link

Incorrect code in sft_kerning #34

Open dkoreshkov opened 7 months ago

dkoreshkov commented 7 months ago

When there is more than 1 subtable the loop will break because it adds to offset more than just the subtable length. offset += 6; offset += 8; offset += length; According to MS, the header contains "Length of the subtable, in bytes (including this header)"

Futhermore, there should be an is_safe_offset litany before bsearch.