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 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" |
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 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" |
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
# HI DAVE! | |
import math | |
canvas = 500 | |
squareSize = 100 | |
startPos = 0 | |
endPos = 400 |
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: Assign Glyph Set | |
# Mathieu Reguer | |
""" | |
version 0.4 | |
- switched to vanilla.dialogs.getFile | |
version 0.3 | |
- Added import charset option |
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
""" | |
selectively copy and paste glyph attributes | |
""" | |
from vanilla import * | |
class attributeMover(): | |
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
#menuTitle: ReMutate Support Layer | |
import ufoProcessor | |
import mojo.UI | |
import pathlib | |
# ---------------------------------------- | |
def get_sources_paths(designspace): |
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 : auto align points | |
# shortCut : command+shift+E | |
""" | |
Move 2 points to align them. | |
Will guess between x and y alignment based on shortest move required. | |
Should align according to italic angle as well. | |
""" | |
do_italic_angle = True |
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.UI import SetCurrentLayerByName | |
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber | |
from fontTools.ufoLib.pointPen import AbstractPointPen | |
import math | |
""" | |
This is *largely* based on the great work of Jackson Cavanaugh on AddOverlapp | |
and the awesome drag offset update by Ryan Bugden | |
It is *extremly* likely not the best way to use merz and subscriber :) |
OlderNewer