Skip to content

Instantly share code, notes, and snippets.

View mathieureguer's full-sized avatar

Mathieu Réguer mathieureguer

View GitHub Profile
"""
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():
@mathieureguer
mathieureguer / AssignGlyphSet.py
Created February 13, 2019 12:34
A glyph set picker for Robofont 3
# menuTitle: Assign Glyph Set
# Mathieu Reguer
"""
version 0.4
- switched to vanilla.dialogs.getFile
version 0.3
- Added import charset option
# HI DAVE!
import math
canvas = 500
squareSize = 100
startPos = 0
endPos = 400
@mathieureguer
mathieureguer / SortExtentionMenu_HighSierraHotFix.py
Last active March 9, 2018 14:26
Just a little hack to fix the Extension menu sorting in Robofont 1.8 + High Sierra
# fix the Extentions menu sorting in macOS High Sierra in Robofont 1.8
# (set this up as a start up script and you're good to go)
# This is just a hack, you should really check out RoboFont 3
from AppKit import *
from lib.doodleMenus import BaseMenu
# ----------------------------------------
@mathieureguer
mathieureguer / takeScreenshotAndSaveIt.py
Last active June 15, 2017 20:42 — forked from typemytype/takeScreenshotAndSaveIt.py.py
take screenshot and save it
import Quartz
import AppKit
import os.path
from mojo.UI import CurrentSpaceCenterWindow
# get a path for a png file next to the ufo
path_base = os.path.splitext(CurrentFont().path)[0]
path = path_base + ".png"
import os.path
# get a path for a png file next to the ufo
path_base = os.path.splitext(CurrentFont().path)[0]
path path_base + ".png"