When I set up a list filter, the glyphs are shown with “Predefined Sorting” . It seems Glyphs assumes that as soon as I have a list filter the order is also relevant?
What I usually want is to filter the glyphs with a given set of names but still display them in the standard order and, more importantly, categorised. Is this possible?
This code simulates what I want:
def setFilter(font, glyphs):
fontView = font.fontView
glyphsArrayController = fontView.glyphsArrayController()
predicate = fontView.predicateForNameList_negative_(glyphs, False)
glyphsArrayController.setFilterPredicate_(predicate)
glyphNames = 'A B C one two three'
glyphNames = glyphNames.split()
glyphs = [glyph for glyph in Font.glyphs if glyph.name in glyphNames]
setFilter(Font, glyphs)
Is there an easier way to do this? It would be great if this could be done without the help of a clumsy script. Maybe each List Filter could have a little checkbox to set whether you want to treat it as an ordered list, or simply a set of glyphs.