slug-font-rendering — Claude Code skill: what it does, how to install
Provides reference HLSL shaders for GPU vector font rendering with the Slug algorithm. Useful for drawing glyphs at any scale without texture atlases.
npx skills add reason-machines/trending-skills --skill slug-font-rendering -a claude-codeWhat slug-font-rendering does
This skill supplies reference HLSL implementations of the Slug algorithm. It calculates glyph coverage directly in fragment shaders using quadratic Bézier curves and lines, avoiding blurry textures when zooming.
The implementation includes slug.hlsl, curve.hlsl, and the band-based optimization in band.hlsl. It functions across rendering APIs like D3D11, D3D12, Vulkan, and Metal via translation layers.
Shaders cannot render text on their own without CPU preprocessing. You must convert TrueType or OpenType contours into curve records on the host and bind them to a GPU structured buffer.
What it helps with
- render vector glyphs on GPU without precomputed font atlases
- evaluate quadratic Bézier coverage directly inside fragment shaders
- reduce per-pixel curve intersection tests using band culling
- integrate Slug text drawing routines into D3D12 or Vulkan pipelines
Example prompts for the agent
- Explain how to bind the curve structured buffer to
slug.hlslin DirectX 12 - Write a CPU contour preprocessor that outputs quadratic Bézier segments for Slug
- Show how band metadata reduces per-fragment curve evaluations in
band.hlsl
How to install slug-font-rendering
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill slug-font-rendering -a claude-code2Manually: put the files in place
~/.claude/skills/slug-font-rendering/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/slug-font-rendering/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill slug-font-rendering -a codex2Manually: put the files in place
.agents/skills/slug-font-rendering/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill slug-font-rendering -a cursor2Manually: put the files in place
.cursor/skills/slug-font-rendering/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills slug-font-rendering2Manually: put the files in place
.github/skills/slug-font-rendering/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill slug-font-rendering -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/slug-font-renderingManually: put the files in place
.devin/skills/slug-font-rendering/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill slug-font-rendering -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about slug-font-rendering
How do I install slug-font-rendering in Claude Code?
Run npx skills add reason-machines/trending-skills --skill slug-font-rendering -a claude-code in your terminal.
What is slug-font-rendering?
It provides HLSL shader references for the Slug vector font rendering algorithm, drawing glyphs on the GPU mathematically.
What prerequisites does Slug need on the host?
You must decompose font outlines into lines and quadratic Bézier segments on the CPU, then upload that data to a GPU buffer before invoking the shaders.