Skip to content

Instantly share code, notes, and snippets.

@simoncozens
simoncozens / noto-static.json
Created Jul 28, 2022
Operation-level timing of static instance generation
View noto-static.json
[
{
"format": "designspace",
"glyphs": 3304,
"instances": 2,
"masters": 2,
"name": "arimo",
"succeeded": true,
"timings": [
[
@simoncozens
simoncozens / noto-variable.json
Created Jul 28, 2022
Operation-level timings for building variable fonts
View noto-variable.json
[
{
"format": "designspace",
"glyphs": 3304,
"instances": 2,
"masters": 2,
"name": "arimo",
"succeeded": false,
"timings": [
[
@simoncozens
simoncozens / precompilation.patch
Created Jul 28, 2022
ufo2ft rust precompilation patch
View precompilation.patch
diff --git a/Lib/ufo2ft/__init__.py b/Lib/ufo2ft/__init__.py
index 4295caa..a98528a 100644
--- a/Lib/ufo2ft/__init__.py
+++ b/Lib/ufo2ft/__init__.py
@@ -1,12 +1,15 @@
import logging
import os
from enum import IntEnum
+import tempfile
View noto-static.json
[
{
"format": "designspace",
"glyphs": 3304,
"instances": 2,
"masters": 2,
"name": "arimo",
"real": 19.89,
"succeeded": true,
"sys": 0.82,
View build-all-noto.py
import json
import urllib.request
import subprocess
import psutil
import tempfile
import os
import glob
import yaml
import re
from fontTools import designspaceLib
View noto-build.json
{
"arimo": {
"format": "designspace",
"glyphs": 3304,
"masters": 2,
"name": "arimo",
"real": 1.6,
"succeeded": false,
"sys": 0.23,
"user": 1.28
View fontninja.py
from ninja_syntax import Writer
import glyphsLib
import argparse
import ufoLib2
import os
from fontTools import designspaceLib
parser = argparse.ArgumentParser(description='Create a ninja file to build a font')
parser.add_argument('input', metavar='INPUT')
View layout-hack.py
from fontTools.ttLib import TTFont
import fontTools.ttLib.tables.otTables as ot
def coverage_for(lookup):
coverage = set()
for st in lookup.SubTable:
coverage |= coverage_for_subtable(st)
return coverage
View gh-timesheet.py
import requests
from dateutil.relativedelta import relativedelta, FR
from datetime import datetime
lastweek = datetime.utcnow().replace(hour=0,microsecond=0) + relativedelta(weekday=FR(-1))
headers = {"Authorization": "bearer "+GITHUB_TOKEN}
def run_query(query):
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
View hands-face-space.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.