Terminal text effects as a single C17 binary. Pipe text in, pick an effect:
ls -la | glyphfx decrypt
cat banner.txt | glyphfx beams
fortune | glyphfx --random-effect
git log --oneline -10 | glyphfx matrixThe effects are a shell toy that lives in a prompt pipeline, so startup and throughput matter. glyphfx links nothing but libc and libm — no interpreter, no import step, no third-party libraries — and starts in well under a millisecond.
The tempting alternative is hand-written assembly. ttfx tried it: an x86-64
engine landed in omacom/ttfx#35 and was
removed again in 7444eea, which
states that ttfx's portable Rust engine (fx) matches or beats it on every
effect; in the matrix below fx is faster on 36 of the 37 effects and asm on the other one. fx is the fastest port that ships, and glyphfx draws the
same conclusion:
- The gains are algorithmic, not instruction-level. fx credits structure-of-arrays character storage, interned visuals, an incremental cell grid, skipped idle ticks and batched writes for its speed — all expressible in C. fx is glyphfx's performance target, chased by transcribing that design into portable C rather than re-deriving it.
- Assembly ties the fast path to one ISA. The ttfx assembly engine needed NASM and per-tier x86-64 builds; everywhere else it declined and ran the old code. Portable C is the same program on every CPU.
- A byte-exact target makes a second implementation a liability. Every effect must reproduce ttfx bit for bit, including banker's rounding and libm results; a hand-tuned assembly engine doubles the surface where the two can silently diverge.
Why not assembly? There is no frame budget to win. glyphfx paces itself at 60 fps and hands one batched frame to the terminal per tick; the thousands-of-fps figures are a benchmark, not the product. Data layout and skipped work are what make the benchmark faster, and that is portable C work.
The result builds anywhere with a C compiler, starts in about 0.3 ms, and renders every effect at thousands to tens of thousands of frames per second with pacing disabled.
All 37, each with a full option surface (glyphfx <effect> --help).
Six effects that ttfx does not have: four from the SolverForge demoscene
productions, and rotozoom and stack, written for glyphfx in the same spirit. They
follow the same contract (text in, the text in place at the end; burnout is
the one exit effect) but sit outside byte parity:
--random-effect draws them only when they are named in --include-effects,
and make originals holds them to determinism, golden streams and a
final-frame check instead. Details in docs/ORIGINALS.md.
Startup is under a millisecond (about 0.3 ms for glyphfx --version). The full
37-effect matrix against ttfx's engines: fx, the fastest port and glyphfx's
target; the removed assembly engine, for the record; and the Rust 0.3.3 engine
that is glyphfx's byte-parity oracle:
Best-of-N total run time at 200×50 with pacing disabled (--frame-rate 0), seed 1, on x86_64:12th Gen Intel(R) Core(TM) i5-12400. Speedups above 1.00× mean glyphfx is faster.
| effect | glyphfx | ttfx (fx) | vs fx | ttfx (asm) | vs asm | ttfx (Rust) | vs Rust |
|---|---|---|---|---|---|---|---|
| beams | 74.3 ms | 18.7 ms | 0.25× | 25.6 ms | 0.34× | 320.8 ms | 4.32× |
| binarypath | 774.9 ms | 166.9 ms | 0.22× | 355.4 ms | 0.46× | 1512.1 ms | 1.95× |
| blackhole | 296.0 ms | 98.3 ms | 0.33× | 116.6 ms | 0.39× | 784.1 ms | 2.65× |
| bouncyballs | 121.9 ms | 50.8 ms | 0.42× | 64.3 ms | 0.53× | 527.5 ms | 4.33× |
| bubbles | 209.6 ms | 73.9 ms | 0.35× | 94.2 ms | 0.45× | 799.7 ms | 3.82× |
| burn | 79.8 ms | 34.3 ms | 0.43× | 52.7 ms | 0.66× | 598.9 ms | 7.51× |
| colorshift | 80.4 ms | 36.7 ms | 0.46× | 33.1 ms | 0.41× | 644.1 ms | 8.01× |
| crumble | 203.3 ms | 81.2 ms | 0.40× | 107.7 ms | 0.53× | 493.0 ms | 2.42× |
| decrypt | 86.4 ms | 27.4 ms | 0.32× | 33.5 ms | 0.39× | 711.5 ms | 8.23× |
| errorcorrect | 49.5 ms | 29.1 ms | 0.59× | 40.6 ms | 0.82× | 539.9 ms | 10.91× |
| expand | 82.4 ms | 30.3 ms | 0.37× | 34.6 ms | 0.42× | 194.9 ms | 2.37× |
| fireworks | 309.0 ms | 108.3 ms | 0.35× | 126.6 ms | 0.41× | 603.5 ms | 1.95× |
| highlight | 17.5 ms | 5.2 ms | 0.30× | 7.1 ms | 0.41× | 69.8 ms | 3.99× |
| laseretch | 151.1 ms | 102.9 ms | 0.68× | 105.3 ms | 0.70× | 912.8 ms | 6.04× |
| matrix | 91.6 ms | 50.6 ms | 0.55× | 56.7 ms | 0.62× | 260.9 ms | 2.85× |
| middleout | 71.1 ms | 16.5 ms | 0.23× | 20.0 ms | 0.28× | 142.2 ms | 2.00× |
| orbittingvolley | 65.9 ms | 26.3 ms | 0.40× | 32.6 ms | 0.49× | 105.7 ms | 1.60× |
| overflow | 79.8 ms | 22.8 ms | 0.29× | 23.3 ms | 0.29× | 156.8 ms | 1.96× |
| pour | 72.3 ms | 31.4 ms | 0.43× | 37.6 ms | 0.52× | 394.0 ms | 5.45× |
| 36.5 ms | 13.0 ms | 0.36× | 14.7 ms | 0.40× | 566.6 ms | 15.52× | |
| rain | 92.5 ms | 34.2 ms | 0.37× | 44.7 ms | 0.48× | 306.1 ms | 3.31× |
| randomsequence | 18.3 ms | 6.2 ms | 0.34× | 8.2 ms | 0.45× | 74.4 ms | 4.07× |
| rings | 785.7 ms | 156.4 ms | 0.20× | 201.8 ms | 0.26× | 926.7 ms | 1.18× |
| scattered | 127.8 ms | 42.0 ms | 0.33× | 49.4 ms | 0.39× | 239.8 ms | 1.88× |
| slice | 57.5 ms | 15.9 ms | 0.28× | 18.7 ms | 0.33× | 107.3 ms | 1.87× |
| slide | 67.6 ms | 24.7 ms | 0.37× | 29.1 ms | 0.43× | 132.3 ms | 1.96× |
| smoke | 41.4 ms | 13.6 ms | 0.33× | 21.7 ms | 0.52× | 279.3 ms | 6.75× |
| spotlights | 201.0 ms | 49.0 ms | 0.24× | 49.1 ms | 0.24× | 437.7 ms | 2.18× |
| spray | 115.0 ms | 47.7 ms | 0.41× | 55.2 ms | 0.48× | 221.6 ms | 1.93× |
| swarm | 735.7 ms | 167.8 ms | 0.23× | 194.4 ms | 0.26× | 1044.8 ms | 1.42× |
| sweep | 19.9 ms | 7.5 ms | 0.38× | 10.5 ms | 0.53× | 104.2 ms | 5.24× |
| synthgrid | 35.2 ms | 10.6 ms | 0.30× | 12.8 ms | 0.36× | 170.7 ms | 4.85× |
| thunderstorm | 52.1 ms | 26.6 ms | 0.51× | 36.4 ms | 0.70× | 522.6 ms | 10.03× |
| unstable | 178.9 ms | 49.8 ms | 0.28× | 59.3 ms | 0.33× | 309.4 ms | 1.73× |
| vhstape | 155.7 ms | 42.9 ms | 0.28× | 57.9 ms | 0.37× | 532.9 ms | 3.42× |
| waves | 84.9 ms | 32.1 ms | 0.38× | 36.9 ms | 0.43× | 902.4 ms | 10.63× |
| wipe | 18.5 ms | 5.3 ms | 0.29× | 7.1 ms | 0.38× | 66.5 ms | 3.59× |
Reproduce with python3 tools/tests/matrix.py (GLYPHFX_TTFX_FX names a ttfx >= 0.5 binary for the fx column, GLYPHFX_TTFX_ASM a build of ttfx 73c7a44 for the asm column), and make perf to gate against regression.
<producer> | glyphfx [terminal options] <effect> [effect options]
glyphfx --help # the 37 effects, the 6 originals, and the terminal options
glyphfx # the same, when nothing is piped in
glyphfx <effect> --help # options for one effect
glyphfx --random-effect # surprise me (--include-effects / --exclude-effects to filter)
glyphfx --print-completion bash|zsh
Terminal options (canvas size and anchoring, color handling, frame rate, text wrapping) go before the effect name; effect options after it. Option names, defaults, metavars, choices, negative-value handling, and nargs match ttfx, so existing invocations work with the binary name swapped.
On a colour terminal the help opens with the glyphfx wordmark, drawn by the
highlight effect. Piped, or under NO_COLOR, TERM=dumb or --no-color, it
is plain text, one option per line. A pipe with nothing in it still prints
NO INPUT., as ttfx does.
libc and libm only.
make # build/glyphfx
make check # unit tests (pure-function, geometry, gradient, RNG goldens)
make debug # ASan/UBSan build
make install # PREFIX=/usr/local by default
make static # static link (build/glyphfx-static)Given the same input, options, and seed, glyphfx produces byte-identical frames and a byte-identical terminal stream to ttfx, verified mechanically against the ttfx binary rather than by eye:
make parity # M0 input/canvas/anchoring option matrix
make effects # every effect's frame stream across seeds and configs
tools/tests/cli_corpus.sh # exit codes and stdout/stderr routing
tools/tests/tty_compare.py # the full pty prep+frames+teardown stream
tools/tests/tty_signals.py # SIGINT/SIGTERM/close/resize behaviorThe six originals have no oracle to match; make originals checks that they
are deterministic, match their recorded golden streams, and end on the right
final frame.
The oracle is a local ttfx checkout, fetched on demand and gitignored:
tools/parity/fetch_reference.shmake effects expects reference/target/release/ttfx unless GLYPHFX_TTFX is
set. A single effect runs with tools/parity/run_effects.sh <effect>.
Linux and macOS. Byte-exact comparison is pinned to Linux/glibc; builds and the unit tests also run on macOS.
repo_facts.db is a nisaba store: an
append-only, temporal key-value log of this project's decisions, benchmarks,
releases and verification results, committed on purpose so the claims in this
repository carry provenance rather than living in chat. Read it with the
nisaba CLI:
nisaba repo_facts.db canon project.release.latest # current value of one key
nisaba repo_facts.db scan perf # everything under a prefix
nisaba repo_facts.db history perf.milestone.v1_0_0 # how a claim changedThe log is the source of truth; repo_facts.db.idx, if present, is a disposable
index cache and is not committed.
glyphfx is a C port of ttfx, which is a Rust port of TerminalTextEffects by ChrisBuilds. The effect set, the animation engine, and the command-line interface are TerminalTextEffects' design; ttfx is the reference glyphfx matches byte for byte.












































