Main Page | Report this Page
Computers Forum Index  »  Computer - Graphics - API (Opengl)  »  How to find pixel size of strings?...
Page 1 of 1    

How to find pixel size of strings?...

Author Message
bob...
Posted: Sat Jul 25, 2009 2:41 pm
Guest
I'm using Nehe's method of bitmapped fonts:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13

I need to be able to find the width and height of strings in pixels using
these fonts so that I can center text. Does anyone know how to do that?

Also, is this method the best to use to get the highest quality fonts
possible?

thanks,
Bob
 
fungus...
Posted: Sun Jul 26, 2009 7:01 am
Guest
On Jul 25, 12:41 pm, bob <bobs... at (no spam) xyzzy.com> wrote:
Quote:
I'm using Nehe's method of bitmapped fonts:http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13

I need to be able to find the width and height of strings in pixels using
these fonts so that I can center text. Does anyone know how to do that?


It's not an OpenGL function but I'm guessing it might be something
related
to the "CreateFont" function - you could type that into Google and
look at
the list of related functions.


Quote:
Also, is this method the best to use to get the highest quality fonts
possible?


No, it's the worst. You should probably use something like GLTT.
 
 
Page 1 of 1    
All times are GMT
The time now is Fri Mar 19, 2010 12:08 pm