Best way to generate rotated text?

67 views
Skip to first unread message

Panagiotis Vossos

unread,
Mar 14, 2013, 8:51:02 AM3/14/13
to freet...@googlegroups.com
I'm using freetype-gl in my application and I can generate very crisp-looking horizontal text by using the GL_NEAREST parameter.  Now I also want to generate text at a specified angle, and I wonder what's the best way to do that.  At the moment, I apply a transformation with glRotate before I call the render method of vertex_buffer_t.  This however produces very jagged output with GL_NEAREST.  Is there a better way?  I could use GL_LINEAR, but this produces very blurry fonts at lower point sizes.

I see that there is already a FT_set_transform function in freetype, but I'm not sure how to use it from freetype-gl.

Thanks in advance,
Panagiotis.

Nicolas Rougier

unread,
Mar 15, 2013, 9:16:46 AM3/15/13
to freet...@googlegroups.com

There is no easy solution I fear. Freetype can rotate glyph, but the result would be hardly compatible with freetype-gl.

If you need a lot of rotated text and performance is not an issue, then you have a look at the glyphy project.


Nicolas
Reply all
Reply to author
Forward
0 new messages