Experimental package to manipulate open source font data.
moon add gmlewis/fonts-b/baloo// Load a font by name
let font = @fonts.Font::load_font("baloo")export MOONBIT_FONTS_DIR=/path/to/your/gmlewis/fonts/repo# Render "Hello World" using the default font (aaarghnormal)
./scripts/render-to-svg.py "Hello World" -o hello.svg
# Render multi-line text with horizontal centering
./scripts/render-to-svg.py "Line 1\nLine 2 Centered" -a center -o centered.svg
# Render text using a specific font (e.g. baloo)
./scripts/render-to-svg.py "Custom Font" -f baloo -o custom.svg
# List all available font families
./scripts/render-to-svg.py --list-fonts
# Use Markdown-style markers for bold/italic if the font family supports them
./scripts/render-to-svg.py "**Bold Text** and *Italic Text*" -f aileron -o styled.svg# Render text to JSON (defaults to y-up)
./scripts/render-to-json.py "Data Graphic" -f abeezee -o graphic.json
# Render multi-line text with right-alignment and y-down coordinates
./scripts/render-to-json.py "Line 1\nLine 2" -a right --y-down -o down.json# Generate sample SVGs for all fonts (in batches of 221)
./scripts/sample-all-fonts.py -o all-fonts.svg "The quick brown fox"
# Use a specific label font
./scripts/sample-all-fonts.py -o samples.svg --label-font aileron_bold$ moon version --all
moon 0.1.20260209 (b129ae2 2026-02-09) ~/.moon/bin/moon
moonc v0.8.1+bd827dc85 (2026-02-09) ~/.moon/bin/moonc
moonrun 0.1.20260209 (b129ae2 2026-02-09) ~/.moon/bin/moonrun
moon-pilot 0.0.1-df92511 (2026-02-09) ~/.moon/bin/moon-pilothttp://www.apache.org/licenses/LICENSE-2.0pub(all) suberror FontError {
FontError(String)
}pub(all) enum AbsoluteCmd {
M
L
C
Q
Z
}impl Eq for AbsoluteCmdimpl Show for AbsoluteCmdtype Cmdpub(all) enum GerberLP {
Dark
Clear
}pub(all) struct Glyph {
char : String
horiz_adv_x : Double
gerber_lp : String
d : String
xmin : Double
ymin : Double
xmax : Double
ymax : Double
}pub(all) struct ParamPair {
x : Double
y : Double
}type ParamsInstall
Download zipExperimental package to manipulate open source font data.