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 ezui | |
from math import hypot | |
from mojo.roboFont import OpenWindow | |
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber, registerSubscriberEvent, roboFontSubscriberEventRegistry, unregisterGlyphEditorSubscriber | |
from mojo.events import postEvent | |
''' | |
a simple demo tool to define measurements between pairs of points |
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 FloatingWindow, CheckBox, Button, TextBox | |
from mojo.UI import NumberEditText, UpdateCurrentGlyphView | |
from mojo.roboFont import CurrentGlyph | |
from mojo.subscriber import Subscriber, WindowController, registerGlyphEditorSubscriber | |
from mojo.pens import DecomposePointPen | |
class MoveGlyphsPanel(Subscriber, 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
import math | |
### updated version of a script by Lukas Schneider, available from the RoboFont documentation: | |
### http://robofont.com/documentation/tutorials/making-italic-fonts/#applying-the-italic-slant-offset-after-drawing | |
### changes in this version: | |
### - handles all layers of all open fonts | |
### - fixed syntax for FontParts / RoboFont 3 | |
''' | |
fixes fonts with Italic Angle but no Italic Slant Offset |
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 NSApp | |
from vanilla import FloatingWindow, EditText, List, Button | |
from lib.tools.shortCutTools import getShortCuts | |
from lib.UI.fileBrowser import shortKeyToString | |
class CommandPalette: | |
def __init__(self): | |
shortcuts = getShortCuts() |
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
''' | |
just a proof of concept, name of the second master is hard-coded at the bottom | |
''' | |
from vanilla import FloatingWindow, CheckBox, Slider | |
from defconAppKit.windows.baseWindow import BaseWindowController | |
from mojo.events import addObserver, removeObserver | |
from mojo.UI import CurrentSpaceCenter | |
import mojo.drawingTools as ctx |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>SVG test</title> | |
<style> | |
@keyframes colorChange { from { background-color: yellow; } to { background-color: red; } } | |
svg { animation: colorChange 3s infinite alternate; } | |
#circle { fill: grey; } /* cursor: move; */ |
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, operator | |
from fontParts.world import OpenFont | |
def autoStartPoints(glyph): | |
if not glyph.bounds: | |
return | |
for contour in glyph: | |
points = [(pt.x, pt.y, pt) for pt in contour.points if pt.type != 'offcurve'] | |
sortedPoints = sorted(points, key=operator.itemgetter(1, 0)) | |
firstPoint = sortedPoints[0][2] |
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 NSApp | |
from vanilla import * | |
class LayersWindow(object): | |
def __init__(self): | |
self.w = FloatingWindow((123, 200), title='layers') | |
self.w.layers = List((10, 10, -10, -10), ['foreground', 'background', 'sketches']) | |
self.w.bind("close", self.closeCallback) | |
self.w.vanillaWrapper = 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
{ | |
"lastUpdate": "2019-09-20 20:56", | |
"extensions": [ | |
{ | |
"extensionName": "Add Overlap", | |
"repository": "https://github.com/roboDocs/AddOverlap", | |
"extensionPath": "AddOverlap.roboFontExt", | |
"description": "Creates an overlap for the selected points.", | |
"developer": "Alexandre Saumier Demers", | |
"developerURL": "http://asaumierdemers.com", |
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
# jackson # [email protected] | |
import os | |
from AppKit import NSFilenamesPboardType, NSDragOperationCopy | |
from vanilla import Window, List, Button | |
class doThing(): | |
def __init__(self, path): |
NewerOlder