Generate sharp, scalable font textures for game engines and real-time rendering pipelines that look clean at any zoom level.
Convert SVG vector shapes into distance field textures that stay crisp regardless of display resolution.
Embed as a C++ library in a custom renderer to produce clean, corner-accurate text without pixelation.
Build a complete font atlas for a game using MSDF-Atlas-Gen, the companion tool for multi-glyph workflows.
Extension features for font and SVG loading require installing FreeType, TinyXML2, and libpng as external dependencies.
This project generates a particular type of texture used in computer graphics to draw crisp, sharp shapes at any size on screen. The core problem it addresses is that ordinary text and vector graphics get blurry or jagged when scaled up or displayed at sizes different from what was originally prepared. A signed distance field is a smarter texture format that stores distance information rather than pixel colors, allowing the graphics card to reconstruct the original shape cleanly at render time. What makes this tool distinctive is its multi-channel approach. Standard signed distance fields struggle with sharp corners, producing rounded results where the original shape had a hard angle. By using all three color channels of a texture to encode direction information from different angles, the multi-channel method recovers those sharp corners almost perfectly. The author developed this technique and documented it in a master's thesis linked from the README. The tool can be used two ways. As a command-line program, you point it at a font file or an SVG file, specify the output size and format, and it writes an image file containing the distance field. As a C++ library, you include the provided headers, load or construct a shape, run the generation function, and receive a bitmap object you can save or pass to a renderer. The core library has no external dependencies, while the extension module adds support for loading fonts, SVG files, and saving PNG images using FreeType, TinyXML2, and libpng. For installation, a prebuilt Windows binary is available on the releases page. On other platforms, the project uses CMake for building from source, and it can also be installed through the vcpkg package manager with a single command. A companion project called MSDF-Atlas-Gen, also by the same author, handles the common case of generating complete font atlases containing many glyphs at once, which is the typical workflow for text rendering in games and real-time graphics applications.
← chlumsky on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.