I have been *sorta* following this and If I understand the problem correctly you might want to to look at the Alagad imagecomponent. It is based on java.awt.
http://imagecomponent.riaforge.org/ It looks like it is giving me accurate measurements based on the strings I am feeding it, be it all caps, lower case or mixed case. I used this to get the width: <!--- create the object ---> <cfset myImage = CreateObject("Component","Image") /> <!--- create the object ---> <cfdump var="#myImage.getSystemFonts()#"> <!--- open the image to write into ---> <cfset myImage.readImage(expandPath("LandingPage_Graphics_Working.jpg")) /> <cfset myfontName = "Verdana" /> <!--- set the font ---> <cfset myfont= myImage.loadSystemFont(myfontName, 14, "regular") /> <!--- create a string to write into the image ---> <cfset myTestString = "bla bla bla bla bla bla " /> <cfset testmetrics = myImage.getSimpleStringMetrics(myTestString, myfont) /> <!--- Find the metrics (width, height, etc) for the string. We will use this to center the string in the image. ---> <cfdump var="#testmetrics#"> testmetrics for lower case returns this: struct ASCENT 15 DESCENT 3 HEIGHT 18 LEADING 0 WIDTH 150 ALL CAPS GAVE ME struct ASCENT 15 DESCENT 3 HEIGHT 18 LEADING 0 WIDTH 198 HTH G! On Tue, Sep 14, 2010 at 3:11 PM, Leigh <[email protected]> wrote: > > >> You could try something like this for the section that sets the style > > .. By that I meant modify the GetTextDimensions() function. > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337016 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

