This file contains 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
from fontTools.pens.pointPen import ( | |
AbstractPointPen, | |
GuessSmoothPointPen | |
) | |
from fontParts.base.bPoint import ( | |
relativeBCPIn, | |
absoluteBCPIn, | |
relativeBCPOut, | |
absoluteBCPOut | |
) |
This file contains 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
# | |
# script for drawbot extension in robofont | |
# draws a fitted / interpolating image from a responsive lettering ufo | |
# [email protected] / 20231204 | |
def ip(a, b, f): | |
return a + f * (b-a) | |
page = (659, 500) # image size | |
margin = 59 # nice to have a margin |
This file contains 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
from vanilla import * | |
from AppKit import NSEvent, NSShiftKeyMask, NSCommandKeyMask, NSAlternateKeyMask, NSControlKeyMask | |
class Test_Only_CheckBox(): | |
def __init__(self): | |
u = 22 | |
self.w = Window((250, u*10), 'Test_Only_CheckBox') | |
self.w.check_0 = CheckBox((5, u*0, -5, u), 'Check 0', value=True, callback=self.checks) |
This file contains 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
# menuTitle : Headless RoboFont | |
import os | |
import AppKit | |
import ezui | |
from mojo.extensions import getExtensionDefault, setExtensionDefault | |
from mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
from mojo.UI import AskString, OpenGlyphWindow, OpenSpaceCenter, OpenFontInfoSheet | |
defaults_key = 'com.typemytype.headLessRoboFont.glyphName' |
This file contains 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 metricsMachine | |
from mm4.mmScripting import MetricsMachineScriptingError | |
from vanilla import FloatingWindow, List, CheckBox, PopUpButton | |
from mojo.events import addObserver, removeObserver | |
from AppKit import * | |
from mojo.UI import Message | |
class SyncMM: | |
def __init__(self): |
This file contains 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
''' | |
An interpretation of a work by Timm Ulrichs | |
see this blog post: https://letterformarchive.org/news/shaped-text | |
See other solutions in this twitter-thread: | |
https://twitter.com/MauriceMeilleur/status/1329218247594561538 | |
''' | |
# --------------- | |
# S E T T I N G S |
This file contains 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
""" | |
Open a bunch of ufos, select a bunch of interestng glyphs in a font window and run this. | |
As a nice bonus, this is also a way to reduce the scope of the the next and previous glyph hotkeys. | |
""" | |
from mojo.UI import SmartSet, AllFontWindows | |
f = CurrentFont() | |
for w in AllFontWindows(): |
This file contains 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 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
Show hidden characters
{ | |
"cmd": ["robofont", "-p", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python", | |
} |
This file contains 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
#!/bin/bash | |
# usage: diffpdf.sh file_1.pdf file_2.pdf | |
# requirements: | |
# - ImageMagick | |
# - Poppler's pdftoppm and pdfinfo tools (works with 0.18.4 and 0.41.0, | |
# fails with 0.42.0) | |
# (could be replaced with Ghostscript if speed is | |
# not important - see commented commands below) |
NewerOlder