/pulp:sdf-textfrom pulp
Builds and samples SDF/MSDF/PSDF glyph atlases for GPU text rendering via SkSL shaders. Useful when working with Pulp's signed-distance-field pipeline or adding text-layout call-sites.
Ships in pulp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Pulp renders text through a GPU-sampled signed-distance-field pipeline so
a single atlas serves every font size with crisp edges. This skill is
for when you are touching core/canvas/src/sdf_atlas.cpp,
msdf_atlas.cpp, or the shader files, or when you add call-sites that
consume pulp/canvas/sdf_text.hpp.
core/canvas/include/pulp/canvas/sdf_atlas.hpp — single-channel atlascore/canvas/include/pulp/canvas/msdf_atlas.hpp — multi-channel atlas (RGB/RGBA)core/canvas/include/pulp/canvas/psdf_atlas.hpp — pseudo-SDF + vector-fallback policycore/canvas/include/pulp/canvas/sdf_text.hpp — SdfPenSnap, SdfTextOptions,
build_text_quads<AtlasT>(), fill_text_sdf/msdf/psdf<AtlasT>()core/canvas/shaders/sdf_text.sksl — single-channel samplercore/canvas/shaders/msdf_text.sksl — median(r,g,b) samplerdocs/reference/sdf-text.md — rendering pipeline referenceexamples/sdf-text-demo/ — runtime SDF text rendering and bloom demoexamples/sdf-vs-msdf-demo/ — console SDF/MSDF atlas dump; MSDF RGB
output is currently single-channel-equivalent until msdfgen is wiredexamples/sdf-effects-demo/ — enumerates host-side effect presets and
writes software-rendered baseline files; visual effects wait for the SkSL
draw pathSdfAtlas::build("") can leave advance = base_size
and bearing_y = base_size for every glyph. Write tests that assert
invariants that hold in both the real and fallback paths, and
tighten only when you can detect the real path was taken
(gM->advance != gi->advance). See test_sdf_atlas.cpp.fwidth gives you subpixel AA for free. Do not add a second
softness uniform for "anti-alias width" — snapping belongs at the
pen (host side), not in the shader.include_alpha=true changes the pixel stride from 3 to 4 bytes.
Use MsdfAtlas::channels() rather than assuming 3.build_text_quads<AtlasT>() only requires
that the atlas expose glyph(c), base_size(), and the usual
SdfGlyph-shaped fields. That means the same helper works for every
atlas variant; do not branch on type.should_use_vector_fallback
is a pure policy helper; callers decide at draw time whether to hit
the Skia path rasterizer instead of the SDF sampler.SkFont via the SkSpan overloads. The historical
(pointer, count, ...) forms of unicharsToGlyphs, textToGlyphs,
getWidthsBounds, getWidths, getPos, getXPos, getPaths, and
getIntercepts are gated behind SK_SUPPORT_UNSPANNED_APIS in
include/core/SkFont.h. On Skia builds where that macro is not
defined (including some chrome/m144 drops), the overloads vanish and
sdf_atlas.cpp fails to compile. On this repo PULP_HAS_SKIA is
only set when libskia.a links successfully, so the break can hide
behind a headers-only pin — confirm by building pulp-canvas
against a tree that ships libskia.a (e.g.
SKIA_DIR=<other-worktree>/external/skia-build) so the compile path
exercises real Skia libraries, not just headers.d is the band's distance, cross is the coordinate.
In shade(PulpChart g), g.d is negative inside the band and reads
-halfWidth on the centre line (it also includes flat caps), so it
is right for coverage and feathering and wrong for a cross-section
profile. Profiles (bevels, tubes, centre highlights) want
u = g.cross / g.halfWidth, which is 0 on the centre line and +/-1 at
the edges. The shader runs over the whole reach-padded rect and owns
its coverage, and it returns premultiplied colour, which the feather
scales as a whole. Chart and preset pixel probes are easiest with
the draw offset by (0.5, 0.5): pixel (i, j) then samples the chart at
exactly p = (i - w/2, j - h/2). Render a probe view as the root of
render_to_rgba; as the child of a plain View the layout pass can
resize it to nothing and the draw still reports success.tools/ci/governed-build.sh cmake --build build --target \
pulp-test-sdf-atlas pulp-test-msdf-atlas pulp-test-psdf-atlas \
pulp-test-sdf-text pulp-test-sdf-effects \
pulp-sdf-text-demo pulp-sdf-vs-msdf-demo pulp-sdf-effects-demo
./build/test/pulp-test-sdf-atlas
./build/test/pulp-test-msdf-atlas
./build/test/pulp-test-psdf-atlas
./build/test/pulp-test-sdf-text
./build/test/pulp-test-sdf-effects
./build/examples/sdf-text-demo/pulp-sdf-text-demo
./build/examples/sdf-vs-msdf-demo/pulp-sdf-vs-msdf-demo # writes /tmp/pulp-*-atlas.{pgm,ppm}
./build/examples/sdf-effects-demo/pulp-sdf-effects-demo # writes /tmp/pulp-sdf-effects-*.pgm
planning/next-features-plan.md § Feature 4)msdfgen library (MIT) for shape-decomposed channelsSdfEffectParams through a SkSL-backed draw path so glow / shadow /
outline / bevel visibly renderWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
signed-distance-field, glyph-atlas, skia, text-rendering, gpu-shader
npx claudepluginhub generous-corp/pulp --plugin pulp73 skills in this plugin
/aaxOptional AAX support for Pulp, including developer-supplied Avid SDK setup, CMake enablement, DigiShell/AAX Validator workflows, and local AAX builds on macOS or Windows./ableton-linkConfigure, implement, and test Pulp's optional desktop Ableton Link tempo-sync adapter while preserving the developer-supplied SDK, licensing, realtime, latency-compensation, and no-install boundaries./agent-capabilitiesMaintain Pulp's installed design-time agent capability manifest and public-surface ledger. Use when adding, removing, renaming, or materially changing public audio, MIDI, signal, timebase, or sequence APIs; registering a new algorithm for generators; changing capability support or deprecation state; or repairing agent-capabilities freshness, schema, fingerprint, tombstone, or installed-SDK tests.Other plugins' skills for the same job