You may want to try using TextLayout instead of FontMetrics getStringBounds()
for a more accurate measurement. The Font API mentions
"The logical bounds does not always enclose all the text. For example, in some
languages and in some fonts, accent marks can be positioned above the ascent or
be
Interesting stuff. I've been wanting to do something like this for a
while now, but a bit different. Given the string X, and an image
Canvas, put X so that is centered horiz and vert. If you had the W/H
of a set of text, it would be trivial.
On Jan 16, 2008 10:46 AM, Ben Nadel <[EMAIL PROTECTED]>
John,
I did something that was inspired by Barney Boisvert. An image function
that draws text areas rather than just a line of text:
http://www.bennadel.com/blog/977-ColdFusion-8-ImageDrawTextArea-Inspired
-By-Barney-Boisvert-.htm
In order to do this, I had to figure out the dimensions of the t
> I am looking for something like the getdimensions() method from
> cfx_imageflare
> http://efflare.com/products/cfx_imageflare/documentation/font.html
My first response did not show up, so I am resending.
Anyway, you might try java.awt.font.TextLayout. I do not think CF image objects
retain t
4 matches
Mail list logo