• Stars
    star
    463
  • Rank 94,134 (Top 2 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A browser-based font editor

Fontra

Fontra Icon

Fontra is an in-development browser-based font editor. It consists of two main parts:

  • Fontra client — runs in the browser, written in JavaScript
  • Fontra server — runs locally or on a remote machine, written in Python

Installing Fontra

Download and install Fontra Pak

Fontra Pak is a Fontra distribution for macOS and Windows. It is a self-contained Fontra server application, which allows you to view and edit fonts in the default browser. We don't have releases for it yet, but you can grab the latest nightly build from the topmost “Build Application” workflow.

Fontra Pak should also work on Linux and other platforms, but you will have to build it from the sources.

Install from the source code

Requirements

  • Ensure you have Python >= 3.10 installed, preferably from python.org

  • Ensure you have Node.js >= 19 installed, preferably from nodejs.org

Setup

  • Check out the Fontra repository (the one you are reading this from), cd into the root of the repository

  • Create a Python venv in the root of the repo:

    python3.10 -m venv venv --prompt=fontra

    (Replace python3.10 with python3.11 if you have 3.11 instead.)

  • Activate venv:

    source venv/bin/activate

  • Install general dependencies:

    pip install --upgrade pip

    pip install -r requirements.txt

    pip install -e .

Testing

The following steps are needed if you want to run the automated tests and if you want to contribute:

  • Install dependencies to run the automated tests:

    pip install -r requirements-dev.txt

  • Install pre-commit to run formatters and linters:

    pre-commit install --install-hooks

  • To verify if everything is working correctly, run both test suites:

    pytest

    npm test

Running

  • Start the fontra server with a path to a folder containing fonts (.designspace, .ufo, .ttf or .otf), using the filesystem subcommand:

    fontra --launch filesystem /path/to/a/folder

  • The default browser will then navigate to:

    http://localhost:8000/

  • To use Fontra with .rcjk data on disk, or to connect to a remote rcjk server, install the fontra-rcjk plugin package. Then you can start it with a robocjk server hostname, using the rcjk subcommand provided by the fontra-rcjk plugin:

    fontra --launch rcjk some-robocjk-server.some-domain.com

Roadmap

The following list of features is not complete, but gives you a rough idea of where we are now, and where we are headed. A green checkmark means: “This feature has been implemented”.

Input / Output

  • Read .designspace âś…
  • Write .designspace
  • Respond to external .designspace changes (automatic reload)
  • Read .ufo âś…
  • Write .ufo âś…
  • Respond to external .ufo changes (automatic reload) âś…
  • Read .ttf + variable .ttf âś…
  • Read .otf + variable .otf âś…
  • Write .ttf + variable .ttf (For “hot fixes”. Currently not planned, will still require export step.)
  • Write .otf + variable .otf (Ditto.)
  • Respond to external .ttf and .otf changes (automatic reload)

Text viewing / editing

  • Basic live text entry, including /glyphname notation âś…
  • Multi-line text âś…
  • Basic glyph selection (pick glyph from list) âś…
  • Basic designspace navigation (via axis sliders) âś…
  • Show live interpolation âś…
  • Hand tool for scrolling âś…
  • Scroll with gestures âś…
  • Zoom with gestures âś…
  • Zoom with short-cuts âś…
  • Advanced character / glyph search
  • Display kerning
  • Apply proper text shaping
  • Full screen mode
  • Right-to-left mode
  • Vertical top-to-bottom mode
  • Enter “edit mode” for glyph by double-clicking on a glyph in the text âś…

Glyph editing

  • Basic outline editing (move points) âś…
  • Basic pen tool (draw points) âś…
  • Edit (variable) component parameters âś…
  • Decompose (variable) component âś…
  • First-class support for quadratic curves âś…
  • Multi-level undo/redo, per glyph âś…
  • Interactive sidebearing editing
  • Numeric sidebearing editing
  • Numeric advance width editing âś…
  • Pen tool for quadratic curves âś… (experimental)
  • Decent outline editing (adding/removing points, removing contours) âś… (with caveats)
  • Select segments âś…
  • Advanced outline editing: edit segments
  • Connecting open paths âś…
  • Knife tool
  • Shape tool
  • Measure tool
  • Copy / paste âś…
  • Create new glyphs âś…
  • Add / remove (variable) components âś…
  • Anchors
  • Guidelines
  • View background layers
  • Edit local variation axes and sources/layers
  • Built-in support for Non-Linear Interpolation
  • Remove overlap and other path operators

Font-level viewing / editing

  • Create new font project
  • Cell-based font overview
  • List-based font overview
  • Edit kerning
  • Edit OpenType features
  • Edit variation axes
  • Visualize and edit variation axis mapping (avar)

Multiple windows

  • Propagate changes across multiple windows in real time âś…
  • Browser URL encodes most view settings âś…

Deployment

  • Basic standalone desktop application for macOS and Windows âś… (Via Fontra Pak)
  • Basic multi-user server deployment with database storage âś… (Via fontra-rcjk, django-robo-cjk, behind NGINX)
  • Research GitHub REST API: can Fontra be a GitHub gateway in a practical way?
  • Research database solutions for server-based font storage
  • Desktop app with integrated browser and auto-update feature (made with Electron or similar)

Scripting

  • A Python scripting library that talks directly to the Fontra server
  • JS scripting for in-browser automation
  • Python scripting for in-browser automation via WASM/PyOdide
  • Add various plug-in APIs, for example:
    • Visualization layer plug-ins for the glyph editor
    • Tool plug-ins

Export

  • FontMake/Fontations integration
  • Incremental compilation using Fontations

Collaborative features

  • Visualizing the selection of others
  • Add review notes / comments
  • Suggested edits

Code structure

  • Client/server architecture (JavaScript/Python) âś…
  • Local or (networked) remote server âś…
  • Client/server communication via JSON objects over a WebSocket âś…
  • Highly modular:
    • Pluggable client views âś…
    • Pluggable read/write storage backends âś…
    • Client-agnostic and storage-agnostic server centerpiece âś…
  • Asynchronous programming model using async/await âś…

Future possibilities

  • Serverless Fontra
  • Peer-to-peer collaboration

More Repositories

1

roboto

The Roboto family of fonts
Python
3,796
star
2

noto-emoji

Noto Emoji fonts
Python
3,331
star
3

Inconsolata

Development repo of Inconsolata Fonts by Raph Levien
Rust
1,201
star
4

fontmake

Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).
Python
763
star
5

morisawa-biz-ud-gothic

Python
615
star
6

compute-shader-101

Sample code for compute shader 101 training
Rust
515
star
7

morisawa-biz-ud-mincho

Python
471
star
8

roboto-flex

HTML
434
star
9

sfntly

A Library for Using, Editing, and Creating SFNT-based Fonts
Java
432
star
10

amstelvar

a parametric variable font by David Berlow
330
star
11

fontview

Demo app that displays fonts with a free/libre/open-source text rendering stack: FreeType, HarfBuzz and Raqm
C++
321
star
12

spacemono

Original monospace display typeface family
318
star
13

decovar

A multistyle decorative variable font by David Berlow
Python
314
star
14

gftools

Misc tools for working with the Google Fonts library
Python
242
star
15

nanoemoji

A wee tool to build color fonts.
Python
239
star
16

opensans

Open Sans font
Shell
221
star
17

literata

A contemporary serif typeface family for long-form reading
Python
219
star
18

dm-fonts

DM Sans, DM Serif
Shell
190
star
19

rubik

Rubik fonts
Shell
182
star
20

glyphsLib

A bridge from Glyphs source files (.glyphs) to UFOs
Python
181
star
21

korean

Google Fonts Korean showcase
JavaScript
161
star
22

atkinson-hyperlegible

HTML
157
star
23

ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
Python
151
star
24

roboto-classic

Development of a Roboto Variable font
Python
151
star
25

science-gothic

Science Gothic, a libre variable font
Python
142
star
26

picosvg

Helps simplify SVG files. Intended for use as part of a font build.
Python
137
star
27

fontdiff

tool for finding visual differences between two font versions
C++
135
star
28

fontations

Reading and writing font files
Rust
114
star
29

pyfontaine

Python tool to check font files for language/character set support
Python
100
star
30

gf-docs

Documentation for things related to github.com/google/fonts
99
star
31

color-fonts

Experimental color font builds.
Python
96
star
32

googlefonts-project-template

(DEMO) Repository architecture example for a typeface design project
Python
93
star
33

inter-gf-tight

Specialized version of Inter with tighter spacing, for use by Google Workspace
Python
79
star
34

glyphsets

Python
77
star
35

fontdiffenator

Font comparison tool
Python
76
star
36

dm-mono

DM Mono
Shell
73
star
37

lexend

A variable font family designed to aid in reading proficiency.
Shell
72
star
38

zen-marugothic

ZenFonts.jp Maru Gothic
Python
72
star
39

fontcrunch

Tool to optimize TrueType font splines
C++
70
star
40

RobotoMono

Shell
64
star
41

colr-gradients-spec

HTML
63
star
42

cu2qu

Cubic-to-quadratic bezier curve conversion
Python
62
star
43

fontreport

Tool to create PDF files containing glyph images and information about a font.
Python
62
star
44

googlefonts.github.io

Google Fonts documentation
CSS
57
star
45

robotoslab

Roboto Slab Typeface by Google
Python
57
star
46

roboto-serif

55
star
47

tajawal

Distinctive low contrast Arabic and sans serif Latin typeface family
54
star
48

emoji-metadata

Emoji metadata for the construction of pickers
48
star
49

dosis-vf

Fork of Dosis
Makefile
45
star
50

oxidize

Notes on moving tools and libraries to Rust.
45
star
51

zen-kurenaido

ZenFonts.jp Kurenaido
Python
45
star
52

comfortaa

Open-source font by Johan Aakerlund
HTML
44
star
53

diffenator2

A font comparison tool that will not stop until your fonts are exhaustively compared.
Python
43
star
54

ibarrareal

Ibarra Real Fonts
Shell
40
star
55

zen-kakugothic

ZenFonts.jp Kaku Gothic
Python
40
star
56

Gulzar

Nastaliq font
Python
39
star
57

gulim

Python
39
star
58

how-to-hint-variable-fonts

A how-to guide to TrueType hinting variable fonts, with VTT
38
star
59

NunitoSans

Shell
36
star
60

zen-oldmincho

ZenFonts.jp Old Mincho
Python
36
star
61

fontra-pak

A cross-platform bundled Fontra server for local desktop use
Python
34
star
62

TachyFont

Lazily loaded web fonts.
JavaScript
34
star
63

majormono

Python
32
star
64

josefinsans

Google Improvement Project
HTML
31
star
65

shaperglot

Test font files for language support
Python
30
star
66

EQX

A typographically centric font testing tool.
JavaScript
29
star
67

fontbakery-dashboard

A library-scale web dashboard for Font Bakery, no longer developed
JavaScript
28
star
68

axisregistry

A Python API to access data from the Google Fonts variable fonts Axis Registry.
Python
27
star
69

fontmake-rs

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Rust
24
star
70

chws_tool

Add OpenType chws/vchw features to fonts.
HTML
23
star
71

lang

A python API for evaluating language support in the Google Fonts collection.
Python
23
star
72

caveat

Caveat handwriting fonts
Shell
23
star
73

compreffor

A CFF table subroutinizer for FontTools
Python
23
star
74

kosugi-maru

Kosugi Maru fonts, originally by Motoya
Python
23
star
75

collidoscope

Brute force detection of glyph collisions
Python
22
star
76

zen-antique

ZenFonts.jp Antique
Python
21
star
77

karla

Python
21
star
78

questrial

A fork of John Prince font Questrial from the old Google font directory
Python
21
star
79

chinese

CSS
20
star
80

gf-glyphs-scripts

Scripts for Glyphs
Python
20
star
81

staatliches

Herbert Bayer’s title lettering for the first Bauhaus exhibition catalogue cover of 1923
Python
18
star
82

batang

Python
18
star
83

changa-vf

Variable font fork of the Changa typeface (Latin, Arabic)
Makefile
17
star
84

Roboto-Delta

Roboto as a “parametric” Variable Font
Python
17
star
85

picosvg-rs

A Rust version of picosvg.
Rust
15
star
86

silkscreen

Classic web design pixel font from Jason Kottke, 2001
Python
15
star
87

gfregression

Test local fonts against fonts host on fonts.google.com
Python
14
star
88

fez

Font Engineering made eaZy
Python
14
star
89

mavenproFont

Maven Pro family by Joe Prince
Makefile
14
star
90

BethEllen

Font project repo for the Beth Ellen font by Rod Jelinski
14
star
91

how-to-hint-complex-script-variable-fonts

A guide to hinting complex script variable fonts with Visual TrueType
11
star
92

ufomerge

ufomerge
Python
11
star
93

dynapuff

Fun blobby display font
Python
10
star
94

fontquant

Prove and quantify a font’s technical quality
Python
10
star
95

kosugi

Kosugi fonts, originally by Motoya
Python
10
star
96

zen-dots

Shell
10
star
97

flowify

Turn a font into a flow font
Python
10
star
98

namecheck

Python
9
star
99

ots-python

Python wheels for the OpenType Sanitizer
Python
9
star
100

variable-components-spec

8
star