Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save schriftgestalt/df1d24c523b1aeb270e5 to your computer and use it in GitHub Desktop.
Save schriftgestalt/df1d24c523b1aeb270e5 to your computer and use it in GitHub Desktop.
Show Glyphs with this Anchor
#MenuTitle: Show Glyphs with this Anchor
# -*- coding: utf-8 -*-
__doc__="""
New Tab with all Glyphs that have the selected anchor.
"""
thisFont = Glyphs.font # frontmost font
selectedLayer = thisFont.selectedLayers[0]
selection = selectedLayer.selection
editString = ""
for anchor in selection:
if type(anchor) == GSAnchor:
anchorName = anchor.name
for glyph in thisFont.glyphs:
thisLayer = glyph.layers[selectedLayer.associatedMasterId]
if anchorName in thisLayer.anchors.keys():
editString += "/" + glyph.name
if len(editString) > 0:
thisFont.newTab(editString) ### Open Tab with all Characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment