Need a way to scale a font to fit a rectangle
I just wrote some code to scale a font to fit within (the length of) a rectangle. It starts at 18 width and iterates down until it fits. This seems horribly inefficient, but I can't find a non-looping way to do it. This line is for labels in a game grid that scales, so I can't see a work-around solution (wrapping, cutting off and extending past the rectangle are all unacceptable). It's actually pretty quick, I'm doing this for hundreds of rectangles and it's fast enough to just slow it down a touch. If nobody comes up with anything better, I'll just load the starting guess from a table (so