This file contains hidden or 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.subscriber import Subscriber, registerRoboFontSubscriber | |
| import pandas as pd | |
| from AppKit import NSPasteboardTypeString, NSPasteboard | |
| ATTRIBUTES = "name unicode width angledLeftMargin angledRightMargin".split(" ") | |
| class contextual_auto_unicodes(Subscriber): | |
| debug = True |
This file contains hidden or 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.subscriber import Subscriber, registerRoboFontSubscriber, unregisterRoboFontSubscriber | |
| from mojo.UI import CurrentGlyphWindow | |
| import AppKit | |
| class force_same_window(Subscriber): | |
| debug = True | |
| def build(self): | |
| self.windowToClose = None |
This file contains hidden or 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.subscriber import Subscriber, registerRoboFontSubscriber | |
| import AppKit | |
| class MargielaTabs(Subscriber): | |
| def fontDocumentWantsToolbarItems(self, info): | |
| image = AppKit.NSImage.imageWithSystemSymbolName_accessibilityDescription_("arrow.trianglehead.merge", "") | |
| newItem = {'itemIdentifier': 'MargielaTabsButton', | |
| 'label': 'Margiela', |
This file contains hidden or 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 mojo.UI import getDefault | |
| from mojo.subscriber import * | |
| import AppKit | |
| from lib.fontObjects.doodleFont import DoodleFont | |
| CHARACTER_SETS = getDefault("charsets") | |
| WIDTH, HEIGHT = 400, 400 |
This file contains hidden or 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.subscriber import Subscriber, registerRoboFontSubscriber, registerCurrentFontSubscriber, unregisterRoboFontSubscriber, unregisterCurrentFontSubscriber | |
| import AppKit | |
| class BASE: | |
| def update_tabs(self, font): | |
| if font: | |
| has_values = True | |
| for val in "familyName styleName".split(" "): | |
| if not hasattr(font.info, val): | |
| has_values = False |
This file contains hidden or 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 sublime | |
| import sublime_plugin | |
| import os | |
| import tempfile | |
| from fontTools import ttx | |
| PREFIX = ".st3_ttx." | |
| SFNT_SUFFIXES = ".otf .ttf .woff .woff2".split(" ") | |
| class OpenTTX(sublime_plugin.EventListener): |
This file contains hidden or 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 more_itertools | |
| def _as_list(item): | |
| return list(more_itertools.always_iterable(item)) | |
| def _get_designspaces(self) -> list[str]: | |
| return _as_list(self.lib.get('public.designspaces', [])) | |
| def _set_designspaces(self, new_designspace:str | list[str]): | |
| self.lib['public.designspaces'] = _as_list(new_designspaces) |
This file contains hidden or 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.subscriber import Subscriber, registerGlyphEditorSubscriber, unregisterGlyphEditorSubscriber, listRegisteredSubscribers | |
| from mojo.UI import inDarkMode | |
| class anchor_scrubber(Subscriber): | |
| debug = False | |
| def build(self): | |
| editor = self.getGlyphEditor() |
This file contains hidden or 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.subscriber import Subscriber, registerRoboFontSubscriber | |
| from mojo.UI import GlyphRecord | |
| class space_center_alts_manager(Subscriber): | |
| def started(self): | |
| self.glyph = None | |
| self.alternates = [] | |
| self.space_center = None |
NewerOlder