Skip to content

Instantly share code, notes, and snippets.

@okay-type
Created February 27, 2019 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okay-type/2e6a87499658e9e6bc18e64ceb599f5b to your computer and use it in GitHub Desktop.
Save okay-type/2e6a87499658e9e6bc18e64ceb599f5b to your computer and use it in GitHub Desktop.
show-one-glyph-for-each-selected-component.py
from mojo.UI import CurrentSpaceCenter
f = CurrentFont()
sc = CurrentSpaceCenter()
s = ''
for g in f.selectedGlyphNames:
n = 0
for x in f.lib['public.glyphOrder']:
if n == 0:
if f[x].name != f[g].name:
for c in f[x].components:
if c.baseGlyph == f[g].name:
s += '/' + f[x].name
n = 1
sc.setRaw(s+' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment