Skip to content

Instantly share code, notes, and snippets.

@jmsole
jmsole / kernproof.py
Last active April 29, 2023 19:52
Kern proof generator with Drawbot and drawbotgrid
from drawBotGrid import BaselineGrid, columnBaselineGridTextBox
import os
import datetime
import itertools
import unicodedata
# When you add more fonts, it stacks the strings for each
# weight to enable easy comparisons.
fonts = ('Helvetica Neue Thin', 'Helvetica Neue', 'Helvetica Neue Bold')
#fonts = ('Helvetica Neue Thin', 'Helvetica Neue')
@jmsole
jmsole / typeproof.py
Last active March 30, 2023 22:27
Type proof generator script for DrawBot. It uses the `wordsiv` library to generate words when the character is not complete. The over script is based on the `simpleproof` script by DJR.
import unicodedata
import datetime
import os
import string
from wordsiv import WordSiv
from itertools import product
import en_wordcount_web
from fontTools.ttLib import TTFont
from fontTools.agl import toUnicode
from fontTools.pens.boundsPen import BoundsPen
@jmsole
jmsole / draw-glyph-outline.drawbot.glyphsapp.py
Last active March 29, 2023 10:08 — forked from arrowtype/draw-glyph-outline.drawbot.glyphsapp.py
For DrawBot in GlyphsApp: Draw a glyph's outlines & nodes, for presentation / social media purposes
"""
Script to create an image of a glyph in the current layer.
Instructions:
- Use within the Drawbot plugin of GlyphsApp.
- Get this plugin via Window > Plugin Manager, then search for "Drawbot" and install it.
- Then, go to File > New Drawbot, and paste in this code and run it.
- You may need to restart glyphs for the Plugin to work.
@jmsole
jmsole / rotating_grid_32.lua
Created October 10, 2021 15:38
rotating grid 32-0.1 -- based on the grid script by @Grey, inspired by grids by @pichenettes.
-- rotating grid 32-0.1
-- based on the grid script by @grey, inspired by grids by @pichenettes.
-- patterns are based on those found in grids, but adapted to 16 values per step
-- and converted to hex numbers to make the script more compact.
patterns={
{{'1000007000003000b0d050009000b000'},
{'d09000f0100000b0005000d030007000'},
{'609010c0607040c0609020e0609040b0'}},
{{'20e0a0e040e0b0f010f0d0e050e07080'},
@jmsole
jmsole / swingclock.lua
Last active May 31, 2020 16:22
A basic cv-controlled clock with swing and clock multiplier for crow
-- a basic cv-controlled clock with swing and clock division
-- input 1: 0 - 5v cv to control tempo
-- input 2: -5 - 5v cv to control swing on even notes
-- 0v is no swing, -5v is 25% swing and 5v is 75% swing
-- output 1: clock without swing
-- output 2: clock with swing and clock division
-- output 3: half-tempo clock with odd beats and clock division
-- output 4: half-tempo swinged clock with even beats and clock division
@jmsole
jmsole / 0_reuse_code.js
Created June 8, 2016 14:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console