Skip to content

Instantly share code, notes, and snippets.

View arialcrime's full-sized avatar

Benedikt Bramböck arialcrime

View GitHub Profile
@arialcrime
arialcrime / roboFontCompDoubleClick.py
Last active February 15, 2022 19:55 — forked from typoman/roboFontCompDoubleClick.py
Fork using Subscriber; RoboFont startup script to enable jump to base glyph of componets by double clicking on the component in glyph view.
from defconAppKit.windows.baseWindow import BaseWindowController
from vanilla import FloatingWindow
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber
from mojo.UI import SetCurrentGlyphByName
"""
RoboFont Helper
Type: Start up
Purpose: After it's run, if you double click on a component it will jump to its base glyph.
"""
@arialcrime
arialcrime / expand-groups-to-components.py
Created January 26, 2021 13:50 — forked from typoman/expand-groups-to-components.py
A RoboFont script to expand kerning groups from base glyph to their composites.
from mojo.UI import CurrentWindow
from simpleKerning import *
"""
A RoboFont script to expand kerning groups from base glyph to their composites.
You need the simple kerning extension installed for this to work.
1. Select base glyph(s) (with contours) which are already grouped
2. Run the script
3. The groups will be expanded to the composites, if:
- Their width is same as the base glyph
#MenuTitle: Uppercase
# -*- coding: utf-8 -*-
"""Converts the selected text to upppercase."""
Doc = Glyphs.currentDocument
Font = Glyphs.font
Doc = Glyphs.currentDocument
TextStoreage = Doc.windowController().activeEditViewController().graphicView().textStorage()
String = TextStoreage.text().string()
Range = TextStoreage.selectedRange()