Ever had problems getting long strings of text to display on images correctly - heres a simple way to word wrap the text and start to have fun with fonts and text on images. It's really easy to work with smaller snippets of text and word wrap those word by word onto the display. This is called Typsetting, and here we're going to show how for a developer, even a beginners, this is how you can layout text and get word wrapping going.
For any language, it should be possible to take this mini tutorial and port it to your own, and apply that to what you're doing. It means you're not worrying about the actual number of characters but instead the looking at the actual rendered length of words in whatever mixed-size font you happen to be using.
Writing in Jupyter, using the PIL / Pillow library, this kind of code is easy to play with especially in Juypter which lets you run and type code and play with just one or two statements without running the entire script over and over.
Code is found at : https://gist.github.com/jmons/2a0b52f...