GlyphWeave
Shape-constrained SVG word clouds, built for speed.
GlyphWeave is a fast Rust CLI + library for generating bold SVG word clouds inside text and shape masks with multiple layout engines, reproducible runs, and palette control.
- Fast by default
- Visual by design
- CLI + library
Example Gallery
Generated with fixed seeds, fast-grid, and fonts/Roboto-Regular.ttf.
RUST (auto) |
AI (complementary) |
|---|---|
DATA (analogous) |
CODE (vibrant) |
|---|---|
Reproduce these assets:
Why It Feels Different
- Fast layouts out of the box with
fast-grid, plusmcts,simulated-annealing,spiral-greedy, andrandom-baseline - Strong visual control with palette strategies, weighted words, rotations, and SVG output
- Reproducible runs through
--seed, config files, and library integration for automation
Install
Optional: include embedded Noto Sans SC at build time.
Quick Start
Use weighted input from file:
# words.txt
rust,3
cloud,2
layout,2
mask
svg
Show all flags:
Use Cases
- Design assets and posters with text-shaped SVG output that stays easy to post-process
- Data storytelling visuals where the shape matters as much as the words
- Scripted and batch generation pipelines through the Rust API or CLI configs
Library Example
use ;
use ;
let font = load_font_from_file?;
let result = generate?;
write?;
# Ok::
Algorithm Cheat Sheet
| Algorithm | Speed | Fill Quality | Best Use Case |
|---|---|---|---|
fast-grid |
High | High | Default production choice |
mcts |
Medium-Low | High | Search-driven quality improvements |
simulated-annealing |
Medium-Low | Medium-High | Stochastic optimization and exploration |
spiral-greedy |
Medium | Medium-High | Center-focused, stable visual structure |
random-baseline |
Low | Medium | Baseline and regression comparison |
Fonts
- Default behavior: try system fonts automatically
- Use
--font <path>to pin a.ttf/.otf - Use
--choose-system-fontfor interactive font selection - Embedded font feature:
embedded_fonts(off by default) - Embedded font: Noto Sans SC, SIL Open Font License 1.1
- License text:
fonts/OFL-NotoSansSC.txt
Config
Config precedence (later overrides earlier):
~/.config/glyphweave/config.toml(or$XDG_CONFIG_HOME/glyphweave/config.toml).glyphweave.tomlin current directory--config <path>- CLI flags
Minimal example:
= [1600, 900]
= "fast-grid"
= "analogous"
= "#0EA5E9"
= 0.85
= 12000
= [0, 90]
Documentation
For Maintainers
The Release workflow supports tag-driven and manual publishing to GitHub Releases, crates.io, and the Acture/homebrew-ac tap.
- Secrets:
CARGO_REGISTRY_TOKEN,HOMEBREW_TAP_TOKEN - Manual inputs:
tag,upload_assets,publish_cargo,update_homebrew - Use the
releaseenvironment if you store publish credentials as environment secrets
License
AGPL-3.0. See LICENSE.