Calculate text bounding box size in pixels

Reply

Join Date: May 2008
Posts: 3
Reputation: rlp1938 is an unknown quantity at this point 
Solved Threads: 0
rlp1938 rlp1938 is offline Offline
Newbie Poster

Calculate text bounding box size in pixels

 
0
  #1
Nov 29th, 2008
I need to be able to calculate the size in pixels of a given piece of text from the font name and point size. Google has not turned up anything I can use as yet (or maybe understand). Clues anyone?

Bob
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,343
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1458
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Calculate text bounding box size in pixels

 
0
  #2
Nov 29th, 2008
Assuming you are using MS-Windows, you will probably find something in one of these Font and Text Functions.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 3
Reputation: rlp1938 is an unknown quantity at this point 
Solved Threads: 0
rlp1938 rlp1938 is offline Offline
Newbie Poster

Re: Calculate text bounding box size in pixels

 
0
  #3
Nov 29th, 2008
Originally Posted by Ancient Dragon View Post
Assuming you are using MS-Windows, you will probably find something in one of these Font and Text Functions.
Sorry no, on a Linux system. Guess I should have said that at the beginning.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,343
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1458
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Calculate text bounding box size in pixels

 
0
  #4
Nov 29th, 2008
I don't do linux but I do know it has several different gui apis, such as Motif, so you have to be more specific about which one you are using.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 3
Reputation: rlp1938 is an unknown quantity at this point 
Solved Threads: 0
rlp1938 rlp1938 is offline Offline
Newbie Poster

Re: Calculate text bounding box size in pixels

 
0
  #5
Nov 29th, 2008
Gui api is X11.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 14
Reputation: d0pedup is an unknown quantity at this point 
Solved Threads: 0
d0pedup d0pedup is offline Offline
Newbie Poster

Re: Calculate text bounding box size in pixels

 
0
  #6
Dec 2nd, 2008
I think xruler might be of some help.
it can be found here
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC