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
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):
from mojo.roboFont import *
from mojo.events import EditingTool, installTool
from AppKit import *
# Original script by Christian Robertson www.betatype.com
# RoboFont version by Travis Kochel www.tktype.com
# Some chunks by Frederik Berlaen www.robofont.com
# Crudely hacked together by Jackson Cavanaugh www.okaytype.com
# Instead of complaining you should help fix this shitty code
# Ted-Nudget version 0.4
@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
SplineFontDB: 3.0
FontName: unifont mono
FullName: GNU Unifont mono
FamilyName: GNU Unifont mono
Weight: Medium
UComments: "Line 1
Line 2"
Version: 1.0-1.84
ItalicAngle: 0
UnderlinePosition: -100
@davelab6
davelab6 / noto-deva-example.html
Created April 25, 2014 09:21
Colorful example of Noto Sans Devanagari
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Example</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/FitText.js/1.1/jquery.fittext.min.js"></script>
<style>
/*
#!/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).
#!/usr/bin/python
# -*- coding: utf-8 -*-
from fontTools import ttLib
def writeFont(font, filename):
font.save(filename)
print "Wrote font to", filename
SplineFontDB: 3.0
FontName: Untitled1
FullName: Untitled1
FamilyName: Untitled1
Weight: Medium
Copyright: Created by Ben Martin with FontForge 2.0 (http://fontforge.sf.net)
UComments: "2013-3-19: Created."
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100