Stroked Fonts?

Is there a way to create stroked fonts similar to wglUseOutlineFonts() (or whatever it’s called…) in Linux? GLUT doesn’t have enough fonts to be really useful, and I don’t really want to write them from scratch .

Chris

I don’t know if this will do what you want, but there is a “glXUseXFont” function you may want to look at. Check out “man glXUseXFont” to see if it is indeed what you need.

Originally posted by chennes:
[b]Is there a way to create stroked fonts similar to wglUseOutlineFonts() (or whatever it’s called…) in Linux? GLUT doesn’t have enough fonts to be really useful, and I don’t really want to write them from scratch .

Chris[/b]

Hi, I’ve just been playing around with using fonts through opengl under Linux. If you look at the Nehe tutorial 13 (http://nehe.gamedev.net/opengl.asp) and scroll down you’ll find an implementation of bitmapped fonts using Linux.

There are actually two versions, one using Glut and the other using the X API through GLX. These will show you how to create the fonts. The GLUT version opens a separate connection to the X server and loads the fonts into a display list using glXUseXFont and the GLX version does the same thing but uses the current connection to the X server. I can’t get the Glut version to work, and I would be interested to know if you can. The GLX version works fine and I am using that at the moment but, unfortunately, if means you have to add a lot of code which glut usually takes care of.

If you need to rotate the text then I’m not sure how you do this. Using the above tutorials makes the fonts always face forward (you can rotate them in 2D and scale them). This is ideal for me because I am using the text to label 3D structures.

Hope this helps.

James

No! Not bitmapped fonts, stroked fonts!

I am currently using bitmapped fonts via glxUseXFont(), but then when I need to print, I have to do some crazy stuff to get them into postscript. If I could just get the font descriptions into OpenGL, I wouldn’t have to use the PS stuff anymore (it’s really ugly).

Chris

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.