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
// indesign script | |
// apply a random transformation to each selected objects | |
// 2024 jackson@okaytype.com | |
function rotate_objects(params) { | |
var rotate_range = parseFloat(params[0]) | |
var x_range = params[1] |
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 mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
# set as a startup script | |
# open new scripting windows with preset code | |
# requires Robofont beta 2401051907 (5 January 2024) or later | |
# ok@ytyt.pe | |
preset = '''# a = AllFonts() |
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
from sub import * | |
class this(): | |
def __init__(self): | |
self.x = 2 | |
y = sub_test(self) | |
print(y) | |
this() |
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 mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
''' | |
Italic angles are complicated. | |
Technically, they don't really exist. | |
They're constructed by font editors to make drawing slanted things more consistent. | |
It's very helpful. |
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 * | |
import os | |
from AppKit import NSFilenamesPboardType, NSDragOperationCopy | |
import re | |
from mojo.roboFont import AllFonts, CurrentFont, OpenFont | |
class Bulk_UFOs(): |
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 mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
''' | |
to do: | |
when only copying x values, skew to italic angle | |
''' | |
class copyanchors(Subscriber): |
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 AppKit import NSScreen | |
from vanilla import * | |
import merz | |
import mojo.subscriber as subs | |
from mojo.subscriber import Subscriber, registerRoboFontSubscriber, unregisterRoboFontSubscriber, listRegisteredSubscribers | |
from mojo.extensions import registerExtensionDefaults, setExtensionDefault, getExtensionDefault, removeExtensionDefault | |
from mojo.drawingTools import * | |
from math import radians, tan, pi | |
from AppKit import NSColor | |
from fontTools.pens.basePen import BasePen |
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 mojo.subscriber import Subscriber, WindowController | |
from mojo.subscriber import registerRoboFontSubscriber | |
from vanilla import Window, List, CheckBoxListCell, Group, Button | |
from AppKit import NSDragOperationMove, NSDragOperationCopy, NSFilenamesPboardType | |
from mojo.UI import AskYesNoCancel, OpenSpaceCenter, OpenFontInfoSheet, OpenGlyphWindow | |
from os import path as ospath | |
from mojo.roboFont import AllFonts, OpenFont, FontsList | |
from defconAppKit.controls.fontInfoView import FontInfoView | |
from mojo.UI import OutputWindow |
NewerOlder