benoitkugler / textlayout

Fonts and text layout for Golang
MIT License
47 stars 7 forks source link

fonts/truetype: fix decoding of composite glyphs with byte offsets #9

Closed eliasnaur closed 2 years ago

benoitkugler commented 2 years ago

Good catch, and thank you for the fix and the font sample ! I've pushed commit #46b7267, which solves the issue in a safer way : the thing is that arg1 and arg2 may be interpreted as unsigned int when used as indices (for anchored points). In this case the conversion byte -> int8 -> uint16 would yield invalid indices.

Fixed by #46b7267.

elias-orijtech commented 2 years ago

Thanks for the quick response and fix!