I need a way to render text that does best effort to stay within bounding boxes. (I can enforce it with clipping for zalgo)
There are two "modes" I require, one for single line text and the other for multi-line.
The single line text needs to be "squished" horizontally to fit, only scaling on the X axis.
The multiline needs to scale on both axis to fit and doesn't contain many line breaks.
I can cache results, but I would still like to have some fast algorithms for this.