sol.text_surface.get_predicted_size() gives wrong width for bitmap fonts
Using the bitmap font 8_bit:
- width of the png is 1152 pixels, or 9 pixels per character
It seems the formula for the width being reported with sol.text_surface.get_predicted_size() is 1 + num_chars*(letter_width - 1)
when it should be num_chars*letter_width
Examples:
Text | Expected Width | Returned Width |
---|---|---|
"" | 0 | 1 |
" " | 9 | 9 |
"AB" | 18 | 17 |
"ABC" | 27 | 25 |
"ABCD" | 36 | 33 |
"0123456789" | 90 | 81 |
I did not do any testing with a ttf font.