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
""" | |
RoboFont subscriber to rotate both the glyph view and space center to help out drawing Mongolian, | |
where the letter shapes are stored in binaries 90° rotated. | |
""" | |
from AppKit import NSNotificationCenter, NSViewFrameDidChangeNotification | |
import ezui | |
from mojo.subscriber import Subscriber, registerSpaceCenterSubscriber, unregisterSpaceCenterSubscriber, registerGlyphEditorSubscriber, unregisterGlyphEditorSubscriber, WindowController | |
from mojo.tools import CallbackWrapper |
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.subscriber import Subscriber, registerRoboFontSubscriber | |
class RemoveGlyphLayersSubscriber(Subscriber): | |
debug = True | |
def fontOverviewWantsContextualMenuItems(self, items): | |
if items["itemDescriptions"]: | |
items["itemDescriptions"].append("---") |
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
md = """ | |
# title | |
## sub title | |
*foo* | |
__italic foo__ | |
[our website](https://example.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
# menuTitle : Headless RoboFont | |
import os | |
import AppKit | |
import ezui | |
from mojo.extensions import getExtensionDefault, setExtensionDefault | |
from mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
from mojo.UI import AskString, OpenGlyphWindow, OpenSpaceCenter, OpenFontInfoSheet | |
defaults_key = 'com.typemytype.headLessRoboFont.glyphName' |
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
""" | |
draw a shape | |
useage in clip-path: polygon(...); | |
""" | |
glyph = CurrentGlyph() | |
for contour in glyph: |
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 | |
import discord | |
from discord.ext import commands | |
TOKEN = os.getenv("BOOKMARK_BOT_TOKEN") | |
intents = discord.Intents.default() | |
intents.message_content = True | |
intents.reactions = True | |
client = discord.Client(intents=intents) |
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
#!/usr/bin/env python3 | |
""" | |
based on | |
https://github.com/andrejbauer/slack-to-discord | |
!slackpreview | |
!slackimport |
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
# written by Tal Leming, posted in the RoboFont Community slack | |
import pathlib | |
import AppKit | |
import ezui | |
from mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
from mojo import roboFont | |
from mojo.UI import OpenScriptWindow | |
roboFontIcon = AppKit.NSApp().applicationIconImage() |
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
# this scripts add a input field at the top of your glyph window | |
# the input text is converted to a list of glyphs objects | |
# and set into the glyph editor | |
# jump around with `esc` and select to edit by hitting a glyph | |
from mojo.UI import GlyphSequenceEditText | |
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber | |
class GlyphLineController(Subscriber): |
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
gem install liquid-c -- --with-cflags="-Wno-compound-token-split-by-macro" |
NewerOlder