Slug renders text and vector shapes by evaluating the exact curve equations for each pixel in the fragment shader. Edges stay sharp at any zoom, transforms cost nothing, and perspective comes out correct because nothing was approximated with triangles. When Lengyel dedicated the Slug patent to the public domain in March 2026 and released his reference shaders under the MIT license, Jeremy started slughorn within three weeks. Nearly every commit since is his.
slughorn handles everything before the GPU. It takes vector data, reduces it to quadratic Bézier curves, and packs them into the curve and band textures that the Slug shaders read. It makes no assumptions about the graphics API: OpenGL, Vulkan, WebGL, WebGPU, Metal and DirectX are all fair game. Most GPU vector renderers want to own the authoring. slughorn is built so you can bring your own.
What goes in
- Fonts through FreeType, including COLRv0 and COLRv1 color emoji with their gradients and transforms
- SVG through NanoSVG, paths and gradients
- Paths from Cairo, Skia and Blend2D
- Shapes drawn directly with a native API modeled on the HTML Canvas element
- Anything else that reduces to quadratic curves, through one helper class
What comes out
Shapes and layered composites with linear, radial and sweep gradients, masks, text set along any path, inside and outside glow effects from MSDF data, per-layer shader fills, compute-shader sources, and full PBR with image-based lighting on any surface, flat or curved. Python bindings cover offline asset work, and a glTF-compatible JSON format saves it all.
Why not Skia
His README takes the question head on. Skia’s GPU backends tessellate curves into triangles, so quality depends on a tolerance, perspective is approximated, and Skia wants to own the OpenGL context. Slug is a shader and two textures, and it drops into a scene graph like any other program. For a fixed-resolution 2D interface, he says, Skia is the better tool. For text on a billboard, a HUD, a curved surface or anything seen through a perspective camera, Slug wins.
In progress
GPU stroking, which is sponsored, plus a pattern API, decal-style rendering and published Python packages. Porter-Duff compositing and more Blend2D and NanoSVG features are planned.