Maximum string length for localized text drawing

I'm running into an unpredictable but relatively reproducible bug with an en.strings file having a key/string pair that's too long for drawLocalizedText() to properly locate and draw.

The character limit seems to be somewhere around 1005 characters, although that also seems somewhat unpredictable with exactly how many characters it breaks at. I've also had it work fine in some tests where I remove every other key/string pair from the en.strings file, but this also hasn't been easily reproducible, strangely.

Attaching a small package if anyone wants to test this on their system. Open up the en.strings file and remove some characters from the "information" string to see it work properly. (2.2 KB)

For our project it isn't an issue really, I'm not using any strings even nearly this long, but I ran into it while testing the limits of some math I built for a text scroll bar.


MacOS 12.3.1 on M1, SDK 1.10.0, Nova 9.3