PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Jul 21, 2018 8:50 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: pixels to ttf size
PostPosted: Wed Oct 13, 2004 9:10 am 
Offline
DevNet Resident
User avatar

Joined: Wed Oct 09, 2002 6:51 pm
Posts: 1206
Location: Keele, U.K.
Has any one come across a way to determine size in pixels to true type font letter size.

I am building a flyer maker and it all works fine execpt for the writing of the description. I need to know how when to wrap a line so that it doesn't get cut off.

I'm using the GD2 library and imagettftext to write the words to an image but I keep cutting words in the description or missing the bottom portion of my product number.

is that clear or does it sound as confused as i am?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 1:24 pm 
Offline
Forum Regular
User avatar

Joined: Wed Jul 30, 2003 3:29 am
Posts: 875
Location: Sweden
http://se.php.net/manual/en/function.imagettfbbox.php
Check out the imagettfbbox() function (phew, hard to spell ;) ), it will help you :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 14, 2004 6:07 am 
Offline
DevNet Resident
User avatar

Joined: Wed Oct 09, 2002 6:51 pm
Posts: 1206
Location: Keele, U.K.
Thanks that was just what I was looking for.
It will be trouble to implement it how I want to but at least I will know the size of the text that needs to be entered.

Thanks again, I don't know how I missed it when searching through the manual maybe getting glassy eyed and not really reading everything.

phpScott


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group