   openGL texture mapped fonts
  Hi everyone,After a lot of debating and asking around, I decided to go with texture based fonts for my application.Now, I have the following questions for you OpenGl experts out there:I plan on using only one type of font in my application, but I need about 4-5 sizes and bold, italic and underlined fonts. Now, my question is that is it possible to generate a texture for only one size and then be able to scale it for different sizes? Do they look good?Also, I am using NVIDIA GeForce 4 Mx-420 card with 64 MB memory. If I generate a full ASCII texture set for 5 font sizes with bold, italic, and underlined fonts, would that be too much (256 X 256 X 5 X 3)? I know texture memory is expensive, but I do not know what is considered 'too much'? I am not generating any other textures? Also, could I extend it in future i.e. have more fonts withoput overwhelming the system?Thanks and cheers,xargon   
  Well You can generate a display list that will draw the text in size 1. Then in Your text drawing function just add scaling to the modelview matrix and You'll have variable-size font. Bold and italic fonts have to be loaded from diffrent textures.   ;  ahhhhhhhh... ok, thanks! Also, then 5 fonts in 3 different weights(bold, italic, underline) is not too much ?Thanks,xargy   ;  You can always squeeze all fonts and weights into a single texture and "translate" the texture matrix to select the font. But I remember reading that at least certain vendors cards might not like people doing that.   ;  well, I can just create three different textures.So, can anyone recommend a tool that will generate these font bitmap textures?Also, how bad does it look, if for example I store the textures at size 8 and then scale it for size 40?Thanks and cheers,xargy   ;Bitmap Font Builder. It really was a godsend for me [lol]! Make sure to enable the 'font smoothing' option.   ;Quote:Original post by xargon123Also, how bad does it look, if for example I store the textures at size 8 and then scale it for size 40?I would say it depends on your scene and the viewpoint (camera position/direction). If you scale a font up and remain at the same viewpoint, then it will begin to look 'bad'. Translate further away and the scaled up font will begin to look good again. ie. something 1x1 unit from 2 units away will look the same if scaled to 5x5 and viewed from 10 units away. You have to scale and position the font based on the scene. I am working on my texture font class at the moment, and I use font's with 16x16, 32x32, and 64x64 pixels per character, but all can look as good or as bad as each other depending upon the camera location and the scaling. I wrote my texture font class to use images of any size (chars horizontally and vertically). I use a number of the fonts from here as is. In orthographic mode you want to limit scaling. If you want text larger, then use a higher-def image, like 32x32 pixels per character or 64x64 and scale (down) accordingly.I would be interested to compare notes actually. I'm having a problem with my font class whereby I get 800 FPS when I display text that has mipmaps generated, but only 80 FPS when i do not generate mipmaps. It's obvious I've made a mistake with my code, but for the life of me I'm stumped why I would get a 10x drop in frame rate when I chose not to generate mipmaps for the font.F451   