Ilmari Heikkinen <kig / misfiring.net> writes: > Hello, > > Is there some simple and nice Ruby lib for rendering text into an OpenGL > texture? Something that takes a string and puts out a BGRA/ARGB pixels. > > Or if that's a bad idea, what's the usual way of rendering nice-looking > text in GL? By nice-looking I mean variable width anti-aliased truetype > fonts with different font sizes, hinting, line heights and all the usual > font rendering lib niceties. Those niceties being the main reason I > don't really want to cook up my own font renderer :) If you're using GLUT, it's got simple text-rendering built-in. If you just want to render the glyphs into a 2D array, libfreetype is built for that. There are ruby bindings for it but I don't know what they're like. Otherwise, FTGL is nice, but I don't see any ruby bindings for it. It has lazy-loaded, texture-based fonts for fast rendering, and extruded geometry fonts for when you want render text as a solid object from different angles. Hopefully it wouldn't be too hard to wrap some ruby bindings around it. HTH.