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
def smartSet(self, pair, value, exceptionType=None): | |
''' | |
pair must be a tuple, its contents can be a glyphName or a group's name | |
value must be an integer, why would you even kern on fractions.... | |
exceptionType is the level of searching the function will do | |
None : use the top level group or glyph names, no exceptions | |
g2G : glyph to Group exception | |
g2g : glyph to glyph exception | |
G2g : Group to glyph exception |
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
# IPA | |
( 0028 | |
) 0029 | |
. 002E | |
/ 002F | |
[ 005B | |
] 005D | |
a 0061 | |
b 0062 | |
c 0063 |
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
/* | |
2D Angle Interpolation (shortest distance) | |
Parameters: | |
a0 = start angle | |
a1 = end angle | |
t = interpolation factor (0.0=start, 1.0=end) | |
Benefits: | |
1. Angles do NOT need to be normalized. |
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
# [h] import ufo into layer | |
import os | |
f = CurrentFont() | |
ufo_path = '/fonts/_Publica/_ufos/Publica_95.ufo' # path to your ufo | |
ufo = RFont(ufo_path, showUI=False) | |
layer_name = os.path.split(ufo_path)[1] |