Skip to content

Commit

Permalink
add Make Unicase Script
Browse files Browse the repository at this point in the history
  • Loading branch information
schriftgestalt committed Aug 31, 2014
1 parent 59da174 commit 3f082df
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Make Unicase Font.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#MenuTitle: Make Unicase Font
# encoding: utf-8

Font = Glyphs.font
masterCount = len(Font.masters)
allGlyphs = list(Font.glyphs)
for upperGlyph in allGlyphs:
if upperGlyph.category == "Letter" and upperGlyph.subCategory == "Uppercase":
lowerName = upperGlyph.name.lower()
print "Lower", lowerName
lowerGlyph = Font.glyphs[lowerName]
if not lowerGlyph:
lowerGlyph = GSGlyph(lowerName)
Font.glyphs.append(lowerGlyph)
for master in Font.masters:
layer = lowerGlyph.layers[master.id]
layer.paths = []
for k in layer.anchors.keys():
del(layer.anchors[str(k)])
layer.components = [GSComponent(upperGlyph.name)]
lowerGlyph.leftKerningGroup = upperGlyph.leftKerningGroup
lowerGlyph.rightKerningGroup = upperGlyph.rightKerningGroup

0 comments on commit 3f082df

Please sign in to comment.