There was the problem when “height” and “width” were typecast to short
integer. So for values more than sizeof(short) we had integer overflow.
Steps to reproduce:
Create simple application with EditBox. Start it. Add 1000 (just
example) characters at a time to the EditBox. Method
Device::getTextureDataForText will be called and there will be integer
overflow for “height” and “width”. As a result application will crash
later.
strings.
As an option, NSStringDrawingUsesLineFragmentOrigin and
NSStringDrawingUsesFontLeading are passed, the result size is differ
from the size which actually strings are rendered.