It looks kinda like the dialog failed to correctly scale the text the same way it scaled the size of the control itself.

Perhaps there's a failure to scale the text due to an unavailable font size, or due to font substitution. It would be nice to know the font-name and font-size used in dialog text controls, so they could be used in $width, but I posted a question for it a while back, but there was no answer.

https://forums.mirc.com/ubbthreads.php/topics/260772/Font_Name/Size_in_Dialog_text_#Post260772