Skip to content

Instantly share code, notes, and snippets.

View davelab6's full-sized avatar
🤓
Obsessed with variable fonts

Dave Crossland davelab6

🤓
Obsessed with variable fonts
View GitHub Profile
@davelab6
davelab6 / extractSbixImages.py
Created March 15, 2017 12:38 — forked from Jolg42/extractSbixImages.py
Extract sbix strikes from font
#!/usr/bin/env python
from fontTools.ttLib import TTFont
from os.path import exists, join
from os import mkdir, sys
# print 'Number of arguments:', len(sys.argv), 'arguments.'
# print 'Argument List:', str(sys.argv)
# print sys.argv[1]
def main():
from unicodedata import *
script_data = {
"names":['Common', 'Latin', 'Greek', 'Cyrillic', 'Armenian', 'Hebrew', 'Arabic',
'Syriac', 'Thaana', 'Devanagari', 'Bengali', 'Gurmukhi', 'Gujarati', 'Oriya',
'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhala', 'Thai', 'Lao', 'Tibetan',
'Myanmar', 'Georgian', 'Hangul', 'Ethiopic', 'Cherokee', 'Canadian_Aboriginal',
'Ogham', 'Runic', 'Khmer', 'Mongolian', 'Hiragana', 'Katakana', 'Bopomofo',
'Han', 'Yi', 'Old_Italic', 'Gothic', 'Deseret', 'Inherited', 'Tagalog',
'Hanunoo', 'Buhid', 'Tagbanwa', 'Limbu', 'Tai_Le', 'Linear_B', 'Ugaritic',
@davelab6
davelab6 / debug.py
Created January 20, 2016 22:10 — forked from sah/debug.py
some handy functions for debugging python code
# Copyright © 2011, 2012, 2013, 2014 Sauce Labs Inc
#
# 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
@davelab6
davelab6 / FuzzWindow.py
Created January 4, 2016 22:30 — forked from adrientetar/FuzzWindow.py
Little defconQt scripting examples
from PyQt5.QtWidgets import QDialog, QPushButton, QVBoxLayout
import random
class FuzzDialog(QDialog):
def __init__(self, parent=None):
super().__init__(parent)
layout = QVBoxLayout(self)
fuzzBox = QPushButton("Fuzz", self)
fuzzBox.clicked.connect(self.glyphFuzzer)
layout.addWidget(fuzzBox)
@davelab6
davelab6 / pypi-release-checklist.md
Created December 22, 2015 10:42 — forked from audreyfeldroy/pypi-release-checklist.md
My PyPI Release Checklist
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
from mojo.events import addObserver
from AppKit import NSSound, NSURL
path = u"http://soundbible.com/grab.php?id=1995&type=mp3"
url = NSURL.URLWithString_(path)
sound = NSSound.alloc().initWithContentsOfURL_byReference_(url, False)
class SomeMotivation(object):
@davelab6
davelab6 / roboto_name_fix.py
Last active May 24, 2016 16:22 — forked from codeman38/roboto_name_fix.py
Fix Windows compatible naming in Roboto font weights
#!/usr/bin/env python2.7
"""Update the 'name' table in the extra Roboto weights to be
more compatible with Windows' font chooser."""
__author__="codeman38"
import argparse
import glob
import os
from fontTools import ttLib

OS X Preferences


#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
from __future__ import division
from mutatorMath.objects.location import Location
from mutatorMath.objects.mutator import buildMutator
"""
Simple demo that can be run in Drawbot
http://www.drawbot.com
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).