tomolt / libschrift

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

Insufficiently wide char code on some platforms #4

Closed maandree closed 4 years ago

maandree commented 4 years ago

Both C and POSIX only specifies that int must be at least 16 bits wide (Linux says 32 bits), so charCode in stf_char should either be an uint_least32_t, an unsigned long int, or a long int (uint32_t could also be used if you only care for normal computers).

tomolt commented 4 years ago

I'd like to avoid using overly specific integer types where possible, so I'm definitely in favour of unsigned long.

tomolt commented 4 years ago

Done as of eeefd2f.