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: Glyph Recipes | |
recipes = { | |
# Desired name, and recipe of what glyphs go in there | |
"fi": ('f', 'i'), | |
"f_l": ('f', 'l') | |
} | |
f = CurrentFont() |
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: Event Subscriber | |
''' | |
A Subscriber-based version of eventObserver. | |
Useful for tracking internal notifications and using it for tool-building. | |
2024.01.22 — Ryan Bugden | |
2024.01.23 — Made a lot faster by Tal Leming. Thanks! | |
''' |
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: Cherry Picker | |
import ezui | |
from mojo.extensions import ExtensionBundle | |
from AppKit import NSApp | |
def safe_mode_state(): | |
obj = NSApp().mainMenu().itemWithTitle_("Safe Mode...") |
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: Consolidate Selected Point Pairs | |
# shortCut : shift + control + f | |
from fontTools.misc.fixedTools import otRound | |
MAKE_INTO_ONE_POINT = True | |
def average(lst): |
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: Unicorn | |
import ezui | |
from mojo.extensions import setExtensionDefault, getExtensionDefault | |
from glyphNameFormatter.reader import u2n, u2U, U2u, n2u | |
EXTENSION_KEY = "com.ryanbugden.unicorn.settings" | |
class Unicorn(ezui.WindowController): |
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: Rotate 180 - All Layers | |
# shortCut: shift + command + r | |
''' | |
A script that rotates your glyph and all of its layers. | |
It does its best to rotate it in a helpful way, not | |
necessarily just around the body of the contours themselves. | |
Use your preferred shortcut in line 2. | |
Ryan Bugden |
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: Accept SVGs from Figma (Start-up script) | |
''' | |
An RF start-up script that allows inbound SVG data from Figma via pasteboard. | |
Should work on simple shapes, might not work for others. | |
Ryan Bugden | |
''' | |
import AppKit |
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: I Finished the Typeface. | |
from mojo.UI import CurrentFontWindow | |
import math | |
import time | |
f = CurrentFont() | |
fo = CurrentFontWindow().fontOverview | |
v = fo.getGlyphCollection().getGlyphCellView() |
NewerOlder