Created
April 19, 2015 14:09
-
-
Save marcdama/b765c7fcc7274239e6a5 to your computer and use it in GitHub Desktop.
From selected glyphs: Print individual glyphs components/order and structure to be remade with FL Generate glyph (CTRL+G)
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 robofab.world import * | |
| f = CurrentFont() | |
| def flat_list(*n): | |
| stringer = '' | |
| if len(n) == 1: | |
| stringer += str(n[0]) | |
| return stringer | |
| for i in n: | |
| stringer += '_%s' %i | |
| return stringer[1:] | |
| hash = {} | |
| for i in f.selection: | |
| if f[i].components: | |
| hash[f[i].name] = [] | |
| for j in f[i].components: | |
| hash[f[i].name].append(j.baseGlyph) | |
| for i in hash: | |
| print '%s=%s' %(flat_list(*hash[i]), i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment