View Single Post
Old 10-11-2012, 09:14 AM   #1
Funkmaster5000
PRESS PLAY ON TAPE
 
Funkmaster5000's Avatar


 
Join Date: Jul 2009
Location: Weilmunster, Germany
Posts: 136
Default Font Pixelsize - Without counting?

Hey guys!

I'm currently working on a game, that involves ASCII Art. In the background I want to have my engine that does the math stuff: collisions, position changes etc.

Of course, the images (texts) differ in size (not in font size: number of chars), but use the same font.

Now I need to know how large a character is in pixels at a certain font size, so that I can define one constant to calculate with. I want to achieve that without counting the pixels manually on screen. Is there a formula or maybe information stored somewhere at the font data? Its Fixedsys.

I haven't found anything on the net so far.

Thanks in advance!
Funkmaster5000 is offline                         Send a private message to Funkmaster5000
Reply With Quote