On 2012-03-11 23:36, Chad J wrote:

No, just getting the font onto the screen at all.

And I want to:
- Be able to size the font smoothly. (No bitmap fonts!)
- Draw glyphs for higher unicode codepoints. (No texture[128]!)
- Have kerning/hinting. (Freetype makes it possible, but does not do it
for you.)
- Have anti-aliasing and maybe even subpixel accuracy.

Tomasz's code does all of this.

Freetype is very low-level. Freetype does not make OpenGL calls. You
give it a font and a codepoint and it gives you a small grayscale bitmap
and a slew of metrics for it. Then it's up to you to figure out where to
put it and how to get it onto the screen.

If this were trivial, Tomasz (and others who have written on the topic,
too) would not have written 5-10 pages of text plus a bunch of D files
full of code. It's just not that easy. It's all in the original link.

It's actually really weird that there isn't much library code out there
to render text in OpenGL. There are a bunch of tutorials that do it
wrong and maybe a few library thingies that I can't use for various
reasons.

I did some font rendering in C# using FreeType and OpenGL for a simple game. I can't remembering it being that hard.

--
/Jacob Carlborg

Reply via email to