Originally Posted by Slug Library
Slug is a software library that has become the professional standard for rendering high-quality, resolution-independent text and vector graphics in 3D applications on the GPU. It can be used for drawing graphical user interfaces, rendering heads-up displays, showing debugging information, and placing text inside a 3D world or virtual environment.
“It’s super easy to integrate. Someone who hasn’t done gfx since fixed function pipeline got it working in our gfx code base in less than a day.” —Blizzard
Slug renders shapes on the GPU directly from outline data composed of quadratic Bézier curves to produce crisp text at any scale or from any perspective. There are no precomputed texture images or signed distance fields. Slug uses a
breakthrough mathematical algorithm, illustrated below, that we invented to achieve perfect robustness with high performance, and it is the
only existing GPU method that renders properly antialiased glyphs with no artifacts under both magnification and minification.
Slug also provides text layout services that calculate the positions of the glyphs that are drawn for a given string of Unicode characters. In addition to basic bounding box and advance width calculations, it can perform kerning, ligature replacement, combining diacritical mark placement, character composition, and alternate substitution. More high-level information is available on the
Slug fact sheet.
Although Slug was originally designed only to render text, it can now draw arbitrary vector graphics using the same technology. Complex diagrams and vector drawings can be rendered at blazingly fast speeds directly on the GPU with total resolution independence.
The full set of features provided by Slug is described in the
Slug User Manual.