Advertisement
Guest User

Untitled

a guest
May 28th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. from robofab.world import *
  2.  
  3. f = CurrentFont()
  4.  
  5. def flat_list(*n):
  6. stringer = ''
  7. if len(n) == 1:
  8. stringer += str(n[0])
  9. return stringer
  10.  
  11. for i in n:
  12. stringer += '_%s' %i
  13. return stringer[1:]
  14.  
  15.  
  16. hash = {}
  17. for i in f.selection:
  18. if f[i].components:
  19. hash[f[i].name] = []
  20. for j in f[i].components:
  21. hash[f[i].name].append(j.baseGlyph)
  22.  
  23. for i in hash:
  24. print '%s=%s' %(flat_list(*hash[i]), i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement