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 __future__ import division | |
from mutatorMath.objects.location import Location | |
from mutatorMath.objects.mutator import buildMutator | |
""" | |
Simple demo that can be run in Drawbot | |
http://www.drawbot.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
import math | |
def segment(x, y, a, d, lw): | |
save() | |
fill(None) | |
stroke(1,1,1) | |
strokeWidth(lw) | |
newPath() | |
moveTo((x,y)) | |
a = math.radians(a) |
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
""" | |
Assuming you have | |
a UFO open in RoboFont | |
a current glyph selected | |
and furthermore that | |
this glyph is part of a git repository | |
and that you have done some work on it | |
and would like to compare the current state in robofont |
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 glyphNameFormatter import GlyphName | |
from glyphNameFormatter.unicodeRangeNames import * | |
greekSymbols = [] | |
for name in getAllRangeNames(): | |
if name in ['Ancient Greek Musical Notation', 'Mathematical Alphanumeric Symbols']: continue | |
a, b = getRangeByName(name) | |
for uniNumber in range(a,b): |
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
# | |
# RoboFab Glyph Construction Database | |
# | |
# format: | |
# Glyphname: BaseGlyph Accent.RelativePosition* Accent.RelativePosition* | |
# *RelativePosition can be top, bottom, left, right | |
# | |
# NOTE: this is not a comprehensive, or even accurate, glyph list. | |
# It was built by Python robots and, in many cases, by tired human hands. | |
# Please report any omissions, errors or praise to the local RoboFab authorities. |
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
""" | |
If you're editing masters or whatever | |
and you want to switch to the same glyph in the other master | |
and you spend a lot of time moving glyph windows around | |
Add this script to RF and wire it to a key command | |
and then woosh woosh woosh cycle between the masters. | |
Possible features, not included | |
- some control over the direction, previous / next |
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
size(1000, 1000) | |
thisFontSize = 242 | |
s = FormattedString( | |
txt="fe AV,", | |
font="EamesCenturyModern-Regular", | |
fontSize=312, | |
) | |
textBox(s , (50, 50, width()-50, height()-1.5*50)) |
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
size(1000, 1000) | |
thisFontSize = 242 | |
s = FormattedString( | |
txt="fe AV,", | |
font="EamesCenturyModern-Regular", | |
fontSize=312, | |
) | |
textBox(s , (50, 50, width()-50, height()-1.5*50)) |
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
# an exploration of the issue described in | |
# https://github.com/typemytype/batchRoboFontExtension/issues/25 | |
# [email protected] | |
# October 25 2017 | |
from pprint import pprint | |
from fontMath.mathKerning import MathKerning | |
from mutatorMath.objects.mutator import buildMutator, Location |
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 mutatorMath.objects.mutator import buildMutator, Location | |
# "That is, travel to any part of the Universe without moving." | |
# This is a demo of how to warp locations in a n-dimensional space. | |
# The mutatorMath Location object is a more or less a basoc python dictionary. | |
# But it can also behave as a math object, and that makes it possible | |
# to calculate xvar like transformations. In this example Location objects | |
# are both used to place an object in a designspace, as well as the objects themselves. |
OlderNewer