Feature Library

Stroke fonts as motion paths

0.27 CPU ms
A still of the Stroke fonts as motion paths demo
Still
The live demo starts when it’s in view.Type your own words · pick a look · Enter or a click on the stage plays them

Text as single-stroke glyph paths that can be drawn, traced and animated.

What it costs a frame

0.27 ms
GPU
not used
CPU, median
0.27 ms
CPU, 95th pct
0.60 ms
Draw calls
0
Weight
Light

Measured 3 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured looping: each pass plays one look start to finish and the next pass the next look (neon striking and humming, the trail writing, the cycles riding), so the frames include all three. The cost is the canvas strokes and their shadow blur, drawn every frame. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.270.60
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.080.36
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.311.03

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
Canvas 2DA 2D canvas: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Title cards and level-up moments
  2. Splash screens and empty states
  3. Signage in games and scenes
  4. Text for plotters, lasers and engraving
  5. Handwriting and drawing-on effects
  6. Path-following animation

Pitfalls, in brief

  1. Canvas shadow blur ignores the transform: scale it by the device pixels per unit (pixelsPerUnit reads it off the context), or the glow shrinks on a high-DPI screen and grows when the words are fitted smaller.
  2. Stroke a whole letter (or all letters equally lit) in one path: separate strokes added together double up where they meet, and a curve of short runs turns into a string of beads.
  3. Do not fake a blur-only halo by drawing the path far off the canvas and offsetting its shadow back on: Chrome’s GPU canvas stopped presenting frames altogether.
  4. Shadow blur is the cost: a few dozen blurred strokes a frame are fine, hundreds are not.
  5. Safari composites every shadowBlur on the GPU each frame, outside the script time: on an iPhone 17 Pro the demo took 21 ms frames for 0.08 ms of script.
4 more in brief
  1. Draw onto a transparent canvas over a CSS backdrop: the reflection and the floor’s fog erase with destination-out, which would cut holes in anything painted on the same canvas first.
  2. The fonts are upper case only.
  3. A perspective floor needs a near limit: points behind the camera project to nonsense, so the projection clamps depth and the floor stops short of the camera.
  4. Reduced motion should show the finished words at once: every look takes motion: false (everything lit or written, no flicker, no riders).
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

Vector arcade lettering (Atari, late 1970s to early 1980s): The arcade beam font is drawn in the manner of vector-display cabinet lettering. A style, no glyph data: the coordinates are the owner’s.

Light cycles, TRON (1982): The cycles and their walls answer the film’s light-cycle race. A design inspiration, no code or data.

textstroke fontsingle-line fontcanvas 2dglowneonpath animationkerningno dependencies

Near it in the frame