Skip to content

eliheuer/runebender-xilem

Repository files navigation

Runebender Xilem

A font editor built with Xilem, a Rust UI framework from the Linebender ecosystem. This is a port of an earlier font editor called Runebender from Druid to Xilem.

Status: Very alpha and actively under development.

Image Image

Image

Building from source

Make sure Rust is installed on your system (MSRV: 1.88), clone the repository and build/run the application:

git clone https://github.com/eliheuer/runebender-xilem.git
cd runebender-xilem
cargo run

Usage

cargo run                            # Opens a file picker
cargo run -- assets/untitled.ufo     # Open a specific UFO file
cargo run -- --verbose               # Run with verbose logging

Keyboard Shortcuts

General

Shortcut Action
Cmd/Ctrl + S Save
Cmd/Ctrl + Z Undo
Cmd/Ctrl + Shift + Z Redo
Cmd/Ctrl + + or = Zoom in
Cmd/Ctrl + - Zoom out
Cmd/Ctrl + 0 Fit glyph to window
Tab Toggle side panels
Space (hold) Temporary preview mode

Editing

Shortcut Action
Backspace / Delete Delete selected points or background image
Arrow keys Nudge selection (1 unit)
Shift + Arrow keys Nudge selection (10 units)
Cmd/Ctrl + Arrow keys Nudge selection (100 units)
T Toggle point type (smooth/corner)
R Reverse contour direction
Cmd/Ctrl + C Copy selected contours
Cmd/Ctrl + V Paste contours
Cmd/Ctrl + Shift + H Convert hyperbezier paths to cubic

Transforms

Shortcut Action
Cmd/Ctrl + D Duplicate selection
Cmd/Ctrl + Shift + D Duplicate + repeat last transform
Shift + H Flip selection horizontally
Shift + V Flip selection vertically
Cmd/Ctrl + Shift + R Rotate selection 90° clockwise
Cmd/Ctrl + Shift + L Rotate selection 90° counter-clockwise

Tools

Shortcut Action
V Select tool
P Pen tool
H Hyperbezier pen tool
K Knife tool

Background Image & Autotrace

Shortcut Action
Cmd/Ctrl + I Import background image (file dialog)
Cmd/Ctrl + T Autotrace background image into bezier paths
Cmd/Ctrl + Shift + T Refit existing outlines to match background image
Cmd/Ctrl + L Toggle background image lock
Cmd/Ctrl + Shift + Y Trace background image using QuiverAI (cloud)

Import a reference image (PNG/JPEG) with Cmd+I, position and scale it behind your glyph using the drag handles, then press Cmd+T to trace it into editable cubic bezier contours using img2bez. Use Cmd+Shift+T to refit existing outlines onto the background image — this warps the current outlines to match the target shape while preserving point count, types, and winding direction for variable font interpolation compatibility. The background image is kept after tracing so you can compare the result.

As an alternative to img2bez, press Cmd+Shift+Y to trace using QuiverAI, a cloud-based AI vectorization service. This requires an API key — see the QuiverAI Support section below for setup. QuiverAI produces clean SVG paths with minimal control points — useful for complex shapes where traditional tracing struggles. Note: requires internet and uses API credits.

Features

Hyperbezier Path Support

Runebender Xilem supports on-curve hyperbezier paths - smooth curves defined by only their on-curve points, with control points automatically computed by a spline solver. This makes drawing visually smooth curves easier.

See docs/hyperbezier-ufo-extension.md for the complete specification. Try using the Hyperbezier tool from the edit mode toolbar or load the example file hyper-matisse.ufo from the assets directory.

Background Image Tracing

Import bitmap images (scanned sketches, reference drawings) as background layers in the glyph editor. Position and scale the image to match your glyph metrics, then autotrace it into editable bezier outlines. Two tracing backends are available:

  • img2bez (Cmd+T) — Local, deterministic bitmap-to-bezier tracing powered by img2bez. Works offline, instant results, font-aware (computes advance width and LSB). Tracing parameters (corner detection threshold, grid snapping) can be adjusted in src/settings.rs.
  • QuiverAI (Cmd+Shift+Y) — Cloud-based AI vectorization powered by QuiverAI. Produces clean SVG paths with minimal control points — useful for complex shapes where traditional tracing struggles.

QuiverAI Support

Runebender supports QuiverAI as an optional cloud-based alternative to img2bez for tracing background images into vector outlines. QuiverAI uses an AI model to convert raster images to SVG, producing clean paths with organized structure.

Setup:

  1. Create an account at quiver.ai and generate an API key from Settings > Developers > API Keys
  2. Add your key to the Runebender config file at ~/.config/runebender/config.toml:
    [quiver]
    api_key = "your-quiverai-api-key-here"
    The config directory and a template file are created automatically on first launch. Alternatively, you can set the QUIVERAI_API_KEY environment variable.

Usage:

  1. Import a background image with Cmd+I
  2. Position and scale the image behind your glyph
  3. Press Cmd+Shift+Y to trace with QuiverAI (or Cmd+T for local img2bez tracing)
  4. The traced outlines replace the current paths and are fully editable
  5. Undo with Cmd+Z if needed — the background image is preserved

Notes:

  • Requires an internet connection and uses 1 API credit per trace
  • QuiverAI outputs general-purpose SVG, not font-specific outlines — you may need to adjust metrics after tracing
  • img2bez remains the recommended default for most font tracing workflows
  • Both backends produce the same output format (editable cubic bezier contours) and support undo

Contributing

Contributions are welcome! Make a PR or issue, but keep in mind this project is very early and things can change quickly. If anyone besides Eli becomes a regular contributor to this we can move it off my personal Github to a new org.

License

Apache-2.0

About

A port of Runebender from Druid to Xilem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages