how to scale text to a bounding rectangle?
- To: mathgroup at smc.vnet.net
- Subject: [mg110357] how to scale text to a bounding rectangle?
- From: Michael <michael2718 at gmail.com>
- Date: Tue, 15 Jun 2010 02:28:58 -0400 (EDT)
How can I automatically scale Text[] to fit into a bounding rectangle of a size that I specify? For instance, I can get a pretty close result here, but it is not perfect (the text doesn't touch the bottom edge of the rectangle), and "36", {0,0}, and {-1,-1} are all numbers I had to find through trial and error: Graphics[{ FaceForm[], EdgeForm[Black], Rectangle[{0, 0}, {100, 10}], Text[Style["Hello", 36], {0, 0}, {-1, -1}] } ] Thanks, Michael