aradotso avatar

Slug Font Rendering

Reference HLSL shaders for the Slug algorithm, which renders vector fonts entirely on the GPU by encoding glyphs as quadratic Bézier curves and computing coverage per-fragment. No texture atlases, scales infinitely, works with TrueType and OpenType. You get the core fragment shader logic for winding number calculation, a band optimization to reduce per-pixel curve iteration, and helpers for Bézier and line segment evaluation. This is a reference implementation from the original paper, so you'll need to wire up your own CPU-side glyph preprocessing and buffer management. MIT licensed, patent is public domain. Good fit if you're building a rendering engine or want high-quality text without atlas hassles.

skills.sh installs
1.2K
GitHub stars
61
last updated
Jul 14, 2026

Install

$ npx -y skills add aradotso/trending-skills --skill slug-font-rendering --agent claude-code

Installs into .claude/skills of the current project.

Files

Slug Font Rendering Algorithm

Skill by ara.so — Daily 2026 Skills collection.

Slug is a reference implementation of the Slug font rendering algorithm — a GPU-accelerated technique for rendering vector fonts and glyphs at arbitrary scales with high quality anti-aliasing. It works by encoding glyph outlines as lists of quadratic Bézier curves and line segments, then resolving coverage directly in fragment shaders without pre-rasterized textures.

Paper: JCGT 2017 — Slug Algorithm
Blog (updates): A Decade of Slug
License: MIT — Patent dedicated to public domain. Credit required if distributed.


What Slug Does

  • Renders TrueType/OpenType glyphs entirely on the GPU
  • No texture atlases or pre-rasterization needed
  • Scales to any resolution without quality loss
  • Anti-aliased coverage computed per-fragment using Bézier math
  • Works with any rendering API that supports programmable shaders (D3D11/12, Vulkan, Metal via translation)

Repository Structure

Sponsors

Details

Repository
github.com/aradotso/trending-skills
First seen
Apr 16, 2026

More from aradotso/trending-skills

All 251

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs