Text Rendering using a Signed Distance Field in OpenGL


When it comes to rendering text in OpenGL there are a few traditional methods that I know of:

1. The first and perhaps the simplest is to use your font engine (such as freetype) to render your string out to a texture using your desired font, at your desired size. This is relatively trivial, produces nice looking results and only requires one textured quad to render. The biggest drawback of this method is the lack of flexibility; if you want to update the string -- even slightly -- you generally have to re-render it. This includes changing the positioning, spacing or other aspect of the individual glyphs. Furthermore, if you have a lot of text then you'll have a lot of textures and especially long strings might need textures to be upsized a lot (to be a valid power of 2).

(read further...)

Test of the System

This is an example of a blog entry or article. This example is only here temporarily to test the system I have in place for functionality and layout. When I write something with substance it will replace this example as the first entry in the system, or maybe not. This is only the first paragraph; the rest that follow will not be coherent and merely exist as further tests of the system. Thanks for reading and don't tell anyone what you saw...

(read further...)