@gstv87
Using
text_size is only required if you need to position the text in a specific way according to it's text size, and is only useful if that said text is dynamic and will change during the game. In any other instances it would be a giant waste of performance. No buts and ifs here, using it in other cases is simply bad code design (not counting debug and other during-development-phase test cases, but those shouldn't be in the finished product anyway).
From what I see on that image Valentine90 posted, he doesn't need to use that method, it's a simple batch of texts displayed with left alignment.
And I finally managed to test this thing...
There really is something wrong here.
The lower window can clearly take at least 2 more zeros, yet if I add another one, text compression kicks in, just like on the window above it.
Both windows got the same size and same font properties.
The red background is the drawable area on the windows, and the same rect I gave to the
draw_text method.
The
text_size method returns 276 for the
width for the top text (which got +1 zero), and that is the same width as the drawing width used for the text.
The bottom text got 265 width according to
text_size. Clearly, it's calculating something wrong, because the real size is actually 243, give or take 1 or 2 if we count an extra pixel on the left/right sides.
So, yeah, I have to agree with Valentine90, something is wrong with the text compression calculation.
I probably haven't noticed this yet, because in all cases I used the default
draw_text method, I had plenty of space left for my texts, so the compression couldn't kick in even with false calculation.