House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Imagettfbbox

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Thomas Stichnoth
10/17/2012 04:02 AM

Hello, does anyone know a coldfusion function like the PHP Imagettffbbox (http://php.net/manual/en/function.imagettfbbox.php) ? Regards vom Germany Thomas stichnoth.net Internetkonzepte und -lösungen Gretchenstr. 7 30161 Hannover <http://www.stichnoth.net/>; http://www.stichnoth.net Tel. 0511 7601528 Fax 0511 7601530

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Gerald Guido
10/17/2012 01:11 PM

No, not that I am aware of. This may help: http://cfsearching.blogspot.com/2008/01/measuring-image-text-width-and-height.html Or this: http://www.bennadel.com/blog/1150-GetTextDimensions-For-Finding-ColdFusion-Image-Text-Dimensions.htm If that doesn't do the trick you would most probably have to dig around in the Java API to tease that info out. http://docs.oracle.com/javase/6/docs/api/ HTH G! On Wed, Oct 17, 2012 at 4:02 AM, Thomas Stichnoth <info@stichnoth.net>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
10/17/2012 03:13 PM

You are right, there is no built in CF function. You will need to use java as shown in those two links. If it is only a single line of text, all you need is Textlayout or FontMetrics.getStringBounds(). Both return the bounding box, with slight differences ie visual versus logical bounds. -Leigh


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 25, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference