Text Rendering

Hi…
Iam looking for a good way to render text. I dont want it to have a fixed size so every character can be different. The usual wglUseFontBitmaps just creates fixed size letters, which I dont want.
I also need to be able to do word wrapping so i need the size of every single character
thx

I found very useful the fonts tutorials on this site :
http://nehe.gamedev.net/
check it out

Originally posted by Dtag:
Hi…
Iam looking for a good way to render text. I dont want it to have a fixed size so every character can be different. The usual wglUseFontBitmaps just creates fixed size letters, which I dont want.
I also need to be able to do word wrapping so i need the size of every single character
thx

Look at http://www.opengl.org/developers/faqs/technical/fonts.htm . You probably want one of the font libraries, which may have what you are looking for, or you may have to use the wgl font funcs to load each character as you are going by changing the current font using CreateFont or similar and SelectObject, and then calling the wgl font func to load the characters you need.

There is also wglUseFontOutlines which can be used to create almost any true type or similar windows non bitmap font.

[This message has been edited by shinpaughp (edited 04-11-2003).]

I need a library that can predict the length of a text without using GDI functions ( theire damn slow ) ( looking at those links now )

The tutorial on NeHe uses the same technique as I am using atm. I would need to use GDI functions to get the width of a text properly