Skip to content

Instantly share code, notes, and snippets.

View ddaanniiieeelll's full-sized avatar
🕴️

Daniel ddaanniiieeelll

🕴️
View GitHub Profile
@typemytype
typemytype / blurryfyer.py
Created November 23, 2015 09:57
apply filters on any view in RoboFont (example is a space center)
"""
Apply any filter on any view.
CIFilter reference: https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/filter/ci/CIAccordionFoldTransition
"""
from mojo.UI import CurrentSpaceCenter
from AppKit import *
@LettError
LettError / copyCurrentGitVersionToPrevLayer.py
Last active July 4, 2019 08:25
RoboFont: copy glif from git repo to layer in current glyph.
"""
Assuming you have
a UFO open in RoboFont
a current glyph selected
and furthermore that
this glyph is part of a git repository
and that you have done some work on it
and would like to compare the current state in robofont
@JBlond
JBlond / bash-colors.md
Last active October 28, 2025 19:34 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@LettError
LettError / selectFont.py
Created February 24, 2018 17:00
Quick sketch for a replacement for SelectFont for RF3.
# coding: utf-8
# replacement for robofab's SelectFont
import os
import vanilla
from mojo.roboFont import CurrentFont, CurrentGlyph, AllFonts, OpenWindow
class SelectFontWindow(object):
def __init__(self, callback=None):
self.fonts = {}
self.callback = callback
@LettError
LettError / comments.py
Created May 24, 2018 08:35
Drawbot sketch for drawing scribbles.
size(1000,400)
def scribble(pos, width, amplitude):
save()
x, y = pos
start = x
strokeWidth(1)
fill(None)
stroke(1-random()*0.2,0,0)
@frankrolf
frankrolf / drawbot_interpolate_glyph_gif.py
Created June 3, 2018 23:16
DrawBot script to create joyful GIF animations of interpolated glyphs
'''
Type@Cooper West, June 2018
Contribution to Andy Clymer's "Expanding a Type Family" workshop
Script to create joyful GIF animations of interpolated glyphs,
either colorful or black & white.
'''
from fontTools.pens.cocoaPen import CocoaPen
{
"cmd": ["robofont", "-p", "$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python",
}
@LettError
LettError / unicodeStyleWriter.py
Created February 28, 2019 14:24
A small converter from normal latin AZ,az to the Unicode math alphabets.
import vanilla
""" Unicode Stylewriter: Use the unicode styles to impress friends and families on the internet. """
class StyleWriter(object):
styles = [
dict(title="𝔸", upper=0x1D538, lower=0x1D552, name='mathdoublestruck'),
dict(title="𝖠", upper=0x1D5A0, lower=0x1D5BA, name='mathsans'),
dict(title="𝗔", upper=0x1D5D4, lower=0x1D5EE, name='mathsansbold'),
dict(title="𝐴", upper=0x1D434, lower=0x1D44E, name='mathitalic'),
dict(title="𝐀", upper=0x1D400, lower=0x1D41A, name='mathbold'),
"atom-shell-commands":
commands: [
{
arguments: [
"-p"
"{FilePath}"
]
command: "roboFont"
name: "build robofont"
options:
@okay-type
okay-type / markcolor-in-glyphoverlayview.py
Last active September 12, 2019 10:24
show the current glyph's mark color in robofont's glyph window
from vanilla import *
import mojo.drawingTools as ctx
from mojo.events import addObserver, removeObserver
from mojo.canvas import CanvasGroup
from mojo.UI import CurrentGlyphWindow
s = 50
class MarkyGlyph(object):