MCPcopy Index your code
hub / github.com/epilys/gerb

github.com/epilys/gerb @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
932 symbols 2,506 edges 75 files 34 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

gerb License No Maintenance Intended Build Status Latest Version netbsd aur

☛ Development has stopped as of 2023-05-03. Discussion
  1. *gerb ʰ-: reconstructed Proto-Indo-European root, meaning to carve
  2. gerb: a font editor in gtk3 and Rust

Editing a glyph inside gerb.

Editing a glyph.

See the Screenshots section.

gerb is a GUI font editor and IDE. It is not production ready, but all the basics are implemented.

It uses the UFOv3 format and can import:[^0]

  • UFOv2 directories
  • Glyphs files

and export:[^1]

  • OpenType files (.otf)
  • TrueType files (.ttf)

[^0]: Import is performed with fontTools and glyphsLib. [^1]: Export is performed with ufo2ft.

ℹ️ Interested in contributing? Consult CONTRIBUTING.md.

Features

  • import from other font source formats
  • export to .otf and .ttf
  • configurable shortcuts system
  • unlimited undos
  • embedded python shell and API for scripting and plugins (work in progress)
  • git integration (work in progress)
  • themeable (work in progress)

Future features

Screenshots [^2]

[^2]: The screenshot typeface is Sporting Grotesque.

Alternative software

  • FontForge is the indisputable FOSS font editor. Realistically this is the only choice one has for making a professional quality typeface with free software.

Some other projects in development are:

  • runebender: development seems to have slowed down (as of Wed 15 Mar 2023). Unfortunately, the project —while excellent— looks like it is encumbered by its UI toolkit's development. In contrast, gerb uses the standard FOSS UI toolkit, gtk.
  • MFEK: it's focused on splitting every functionality into micro-libraries. gerb's technical goal is shipping a font editor.

Install

Packages

Packages are available:

It is also installable from crates.io: cargo install gerb

Prebuilt GNU/Linux & macos amd64 binaries

See 'Releases' for binaries of tagged releases built in the CI.

Build

To build, you will need Rust's cargo tool. You can get it from your distribution's packages, or directly with the official rustup tool. If the build fails because of missing system libraries, see the Dependencies section of the README.

Download or clone the git repository with your method of choice, e.g.:

git clone https://github.com/epilys/gerb.git
cd gerb
cargo build --release

Dependencies

Needs gtk-3. For the python feature you'll need libpython3.9 or greater.

On Debian and relatives:

apt install libgtk-3-dev

On macOS you can install dependencies with Homebrew:

brew install librsvg gtk+3 gnome-icon-theme

Run & Configuration

You can open a UFOv3 project from the GUI ( File->Open or Ctrl+O ) or directly in the command line with the -u flag. Assuming the project directory is "/path/to/font.ufo":

# Directly calling the binary:
gerb -u /path/to/font.ufo
# Running through cargo
cargo run --release -- -u /path/to/font.ufo

Configuration of various settings is stored at the $XDG_CONFIG_HOME/gerb directory in a TOML file. The usual location would be $HOME/.config/gerb/config.toml. dconf is not used but PRs that add dconf support are welcome.

Extension points exported contracts — how you extend this code

ToolImplImpl (Interface)
The ToolImplImpl that each derived private struct has to implement. See derived_button/imp.rs for how to override functi [8 …
src/editor/tools/tool_impl.rs
PropertyWidget (Interface)
(no doc) [9 implementers]
src/utils/property_window/types.rs
ObjRef (Interface)
(no doc) [6 implementers]
src/api/registry.rs
StyleReadOnly (Interface)
Helper trait to set CSS styling for read only entry fields. [1 implementers]
src/utils.rs
EnumValue (Interface)
(no doc) [3 implementers]
src/app/settings/types.rs
CharBlock (Interface)
(no doc) [2 implementers]
src/unicode/mod.rs
ToolImplExt (Interface)
Public trait that implements our functions for everything that derives from ToolImpl [1 implementers]
src/editor/tools/tool_impl.rs
ColorExt (Interface)
(no doc) [2 implementers]
src/utils/colors.rs

Core symbols most depended-on inside this repo

get
called by 420
src/api/registry.rs
set
called by 341
src/api/registry.rs
iter
called by 129
src/unicode/names/mod.rs
as_ref
called by 103
src/utils.rs
build
called by 84
src/glyphs/guidelines.rs
push
called by 84
src/api/shell.rs
name
called by 78
src/glyphs/metadata.rs
points
called by 77
src/utils/curves.rs

Shape

Method 662
Function 116
Class 104
Enum 35
Interface 15

Languages

Rust98%
Python2%

Modules by API surface

src/editor/tools/tool_impl.rs55 symbols
src/ufo.rs34 symbols
src/ufo/glif.rs33 symbols
src/utils/colors.rs31 symbols
src/utils/points.rs30 symbols
src/glyphs/guidelines.rs30 symbols
src/glyphs.rs29 symbols
src/utils/range_query.rs26 symbols
src/utils/curves.rs24 symbols
src/utils.rs23 symbols
src/editor/tools/panning.rs23 symbols
src/views/canvas.rs22 symbols

For agents

$ claude mcp add gerb \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact