Skip to content

Instantly share code, notes, and snippets.

View jansindl3r's full-sized avatar

Jan Šindler jansindl3r

View GitHub Profile
import sys
import argparse
from fontTools.subset import main as subsetter
from fontTools.ttLib import TTFont
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument('font_in', type=Path)
@jansindl3r
jansindl3r / unpackInclude.py
Last active June 16, 2020 13:07
flatten linnked feature files
import re
from pathlib import Path
def solveFeatureLinking(path, container=''):
if not container:
with open(path, 'r') as inputFile:
container = inputFile.read()
pattern = re.compile(r'include\ *?\((.*)\)\ *?\;')
@jansindl3r
jansindl3r / makeLog.py
Last active May 27, 2020 14:31
make sheet of current of a font in RoboFont
# this is a script that creates a .pdf of current font with given letters
# custom settings file can be provided in folder where the output goes to
import drawBot as db
from pathlib import Path
import json
from datetime import datetime
db.newDrawing()
db.size('A4Landscape')