This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# replacement for robofab's SelectFont | |
import os | |
import vanilla | |
from mojo.roboFont import CurrentFont, CurrentGlyph, AllFonts, OpenWindow | |
class SelectFontWindow(object): | |
def __init__(self, callback=None): | |
self.fonts = {} | |
self.callback = callback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import os | |
import vanilla | |
import mojo.canvas | |
from mojo.UI import PutFile | |
from random import random | |
from mojo.drawingTools import * | |
import drawBot | |
from AppKit import NSTimer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size(1000,400) | |
def scribble(pos, width, amplitude): | |
save() | |
x, y = pos | |
start = x | |
strokeWidth(1) | |
fill(None) | |
stroke(1-random()*0.2,0,0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
""" | |
This is an exploration of some of the calculations we can do | |
based on the size of a typographic detail in a shape, the distance | |
of the shape to the eye, the average amount of light that shines | |
on the shape, the amount of that reflected light that will be captured by the eye, | |
the aperture of the pupil and some other factors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AppKit | |
from mojo.events import installTool, EditingTool, BaseEventTool, setActiveEventTool | |
from mojo.drawingTools import * | |
from mojo.UI import UpdateCurrentGlyphView | |
from defconAppKit.windows.baseWindow import BaseWindowController | |
import math | |
# | |
# | |
# A visualisation for RoboFont |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vanilla | |
""" Unicode Stylewriter: Use the unicode styles to impress friends and families on the internet. """ | |
class StyleWriter(object): | |
styles = [ | |
dict(title="𝔸", upper=0x1D538, lower=0x1D552, name='mathdoublestruck'), | |
dict(title="𝖠", upper=0x1D5A0, lower=0x1D5BA, name='mathsans'), | |
dict(title="𝗔", upper=0x1D5D4, lower=0x1D5EE, name='mathsansbold'), | |
dict(title="𝐴", upper=0x1D434, lower=0x1D44E, name='mathitalic'), | |
dict(title="𝐀", upper=0x1D400, lower=0x1D41A, name='mathbold'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import drawBot as ctx | |
import os | |
from os.path import expanduser | |
home = expanduser("~") | |
imagesDir = "Library/Mobile Documents/com~apple~CloudDocs/RoboFont/" | |
path = os.path.join(home, imagesDir) | |
if not os.path.exists(path): | |
os.makedirs(path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
test all open fonts on compatibility | |
create temp designspace file | |
align all fonts on a temp axis | |
order does not matter | |
run designspaceProblems | |
present the data somehow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data 'ICON' (20265) { | |
$"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ | |
$"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ | |
$"0000 0000 0000 0000 0000 0000 00FE 0000" /* .............˛.. */ | |
$"0101 0000 0210 8000 0438 4000 0854 2000" /* ......Ä[email protected] . */ | |
$"1082 1000 2101 0800 4210 8400 8428 4200" /* .Ç..!...B.Ñ.Ñ(B. */ | |
$"0844 2000 1082 1000 0101 0000 0200 8000" /* .D ..Ç........Ä. */ | |
$"0400 4000 0000 0000 0000 0000 0000 0000" /* ..@............. */ | |
$"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os.path import expanduser | |
home = expanduser("~") | |
backgroundFolder = os.path.join(home, "Library/Application Support/Microsoft/Teams/Backgrounds/Uploads") | |
size(1920, 1080) | |
s = 10 | |
sw = int(width()/s) |