Skip to content

Instantly share code, notes, and snippets.

View arrowtype's full-sized avatar

Stephen Nixon arrowtype

View GitHub Profile
@arrowtype
arrowtype / README.md
Last active April 7, 2021 17:34
An example script that adds a starter set of anchors to one or more UFOs. This must be run in RoboFont, but could be easily adapted to run via the command line only.

Add (starter) anchors to UFO(s)

An example script that adds a starter set of anchors to one or more UFOs.

This is intended to save time clicking around and typing to add anchors to glyphs across one or multiple sources of a font project. You will still need to go through the glyphs to refine the positioning of anchors after running this script, as positions are only rough guesses.

You can remix/extend the script to add anchors to more glyphs, add special anchors to certain glyphs at certain positions, and more.

This script is intended to be run in RoboFont, but it could be easily adapted to run via the command line only, using the FontParts API.

@arrowtype
arrowtype / abc-grid-flipped.drawbot.py
Created March 26, 2021 02:10
Make a cool reflected alphabet pattern in Drawbot.
"""
Make a cool reflected alphabet pattern.
Inspired by Klaus Burkhardt and Reinhard Döhl, Rot 40:
Poem Structures In the Looking Glass, Edition Rot, Stuttgart, 1969.
https://twitter.com/Lett_Arc/status/1375252819620466688
"""
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@arrowtype
arrowtype / DarkConnor.roboFontTheme
Last active April 24, 2023 02:01
A dark theme for the RoboFont extension Theme Editor, based on the default "Connor’s Theme," but adjusted for a dark background. Updated April 2023.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>glyphViewAlternateFillColor</key>
<array>
<real>0.0</real>
<real>0.0</real>
<real>0.0</real>
<real>0.6027</real>
"""
A RoboFont script to check if "dark mode" is currently active and apply dark preferences in RoboFont if so.
Works best if set up as a "Start Up Script." Here’s how to make it one:
1. Open RoboFont > Preferences
2. Go to Extensions > Start Up Scripts
3. Click the "+" icon, then add this script
4. Click "Apply" to save setting changes
5. Restart RoboFont!
@arrowtype
arrowtype / LICENSE.txt
Last active March 19, 2025 19:17
A RoboFont script to generate a faux-italic font
MIT License
Copyright 2020, 2025 Arrow Type / Stephen Nixon
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WIT
@arrowtype
arrowtype / copy-kerning-in-pair_list-from-ufo-to-ufos.py
Last active June 26, 2020 13:29
A script to run on UFO files from a command line. Goes through a pair list and copy kerns from one UFO to others, if those kern pairs are in the pair list.
"""
A script to run on UFO files from a command line. Goes through a pair list and
copy kerns from one UFO to others, if those kern pairs are in the pair list.
What happens:
- copy groups from ufoToCopyFrom to each other UFOs
- for each pair in the pair list, copy kern from ufoToCopyFrom to each other UFOs
---
@arrowtype
arrowtype / getting-started-in-type-design.md
Last active July 9, 2025 13:49
Some tips for getting started in type design, plus a few favorite extensions and tools

Getting started in Type Design (and possible next steps)

So, you’re interested in type design, but you are still figuring out how & where to start or get to the next step. This post is a non-exhaustive attempt to share an overview of how you might learn some basics, how you can get started with font editing software, and where you might consider growing your skills after that. It reflects my bias and (some of) my personal experience, and it completely skips important topics like formal education, calligraphy and sketching, bezier drawing tips, and more.

This started as an email listing my favorite RoboFont extensions, and then I thought that it would be worth sharing publicly, and then I added more and it turned into a bigger post. In the future, I hope to bring it onto a proper blog as a collection of separate, more-focused topics.

General learning

Useful Internet resources

@arrowtype
arrowtype / 00-toggle-darkmode.robofont.py
Last active February 3, 2022 05:57
A script to toggle darkmode in RoboFont, for app UI and Font View. Also includes a dark theme for the RoboFont Theme Editor.
"""
Toggle a dark mode in RoboFont.
For a dark mode in the Glyph Edit view, install Theme Editor:
https://github.com/connordavenport/Theme-Manager
...and import the "Dark Connor" theme from this Gist
(https://gist.github.com/arrowtype/ce0cee426f47c2fe7e82aa07d1e0a450).
Also offers to edit the markColor of glyphs with a high opacity in their markColor,
which will disrupt the visual effect of a dark mode on the Font View. However,
@arrowtype
arrowtype / set-new-mark-opacity.robofont.py
Created May 3, 2020 17:57
RoboFont script to help set new mark opacity for a selected mark
"""
Get the mark color of currently-selected glyphs and change the
opacity of it in the current font.
Useful for changing the Font View to a "dark theme," where
the wrong mark opacity can suddenly disrupt a system of colors.
"""
f = CurrentFont()
@arrowtype
arrowtype / compute-remaining-unicodes.py
Last active June 26, 2023 17:03
A command-line tool to produce a "trial font" for input OTF or TTF font files, using Python 3 & FontTools
"""
From
https://github.com/arrowtype/recursive/blob/eb821735e66402b4b485ce97ed32b09a8555341e/src/build-scripts/make-release/compute-remaining-unicodes-in-font.py
The FontTools Subsetter expects unicode ranges for *inclusion*, but
often you just know which ranges you want to *exclude* from a font subset.
So, this script will accept a font, then report what Unicode values
it includes *beyond* given Unicode ranges.