Quote Originally Posted by DarkDragon View Post
What is the purpose of the check w>128 || h>128? Why not write directly to prim_bmp in all cases?
I'm not sure. That has always been there, and was never commented. I expected it was some safety check, and I didn't touch it because of that. It could be related to the zcfont sizes, or something, or it could be a copy/paste carryover from draw_character.

The weird part is that this has been undocumented for so long. Surely someone bust have tried to draw a number with more than one digit, that had the size args set. I don;t know if 2.50.0 did this, and I mean to check, as if it does not, then we need to look back at the function as it was then, and see what happened.
I may have run into this in the past, and forgotten...not sure. I usually use string.zh itoa() to convert numbers into text, and plug them into strings that I render with drawstring, or similar.

I'm rather certain that these were more recently rewritten by Gleeok anyway, and that we will need to use those that are designed to interact with the new bitmap buffers. I know that he reworked draw_string.

I fixed this because a user brought it to my attention, it was silly, and I could clearly see the problem. I didn't want to marry it in the process though.and I didn't try to change its behaviour, other than making it draw properly. Setting the initial size to the precise size of the font, clipped it, hence the +1, and that tells me that we aren't reading the text buffer properly, or that our routines to clip the decimals are wrong.