Text on a GPU is usually faked. The common trick is a texture atlas of pre-rasterized glyphs, which looks fine until you zoom in, tilt the text in 3D, or wrap it onto a curved surface. Then the edges go soft and blocky, because you are scaling a bitmap. For a cockpit label, a map annotation, or a moving-map readout that has to stay crisp at any range, that is not good enough.
Slughorn is our answer. It is a modern C++20 library, MIT-licensed and open on GitHub, that implements the open-source release of the "Slug" GPU vector-graphics technique by Eric Lengyel. Slug draws glyphs from their actual Bezier outlines on the GPU, so text stays sharp at any zoom and any angle, with no atlas to run out of and no resolution to outgrow.
What Slughorn is, and isn't
Slughorn is not a renderer. It does not try to own your scene graph, swap chain, camera, or material system. It is an input and adaptation layer: you hand it vector data (from a backend that produces Bezier curves, or through an HTML canvas-style API written directly in code) and it prepares Slug-compatible data that your own GPU pipeline uploads and draws. It intentionally drops into a pipeline you already have instead of asking you to rebuild around it.
Where it runs
Slughorn makes no assumptions about the graphics API. It works with OpenGL, Vulkan, WebGL, WebGPU, Direct3D, and Metal: Slughorn produces the data, your renderer draws the curves. For OpenSceneGraph we maintain a companion project, osgSlug, that wires Slughorn into an OSG scene, and the same approach extends to VulkanSceneGraph. If you already run one of the engines we work in, sharp vector text is a small integration, not a rewrite.
What it's for
Avionics and instrument displays, moving maps and geospatial annotation, embedded and safety-critical UIs, and any real-time 3D scene where labels and glyphs have to stay legible while the camera moves. It handles vector graphics beyond text as well: MSDF and composite-shape masking, miters and caps, with fuller Porter-Duff compositing on the way.
Get it, or get help with it
Slughorn is free and MIT-licensed. Read the background here, get the code and User Guide at slughorn.io, or pull it from GitHub. If you want it integrated into your engine, extended for your data, or supported under contract, that is the kind of work we do every day.