List filter with categories

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.

1 Like

Assume, nice way to put it. You cannot imagine how picky people are about the sorting, both the temp sorting with a list filter, and the permanent sorting with glyphOrder.

Thanks for your reply, but it does not address my question.

True. Wanted to add another paragraph, confirming that this is not currently possible on board. I’ll put it down as a feature request for a future version.

Thanks!

You can add **Categorie** entries in the list filter to get categories.

1 Like