I’ve been trying to debug why the sorting from my custom GlyphData.xml would end up breaking those glyphs here to new lines. It furthermore seems the sortNames aren’t really respected at all, e.g. the last glyph that gets sorted into the “row” of glyphs has sortName deva270, whereas the first “single row” glyph has deva040 and should come before those. Changing the sortName between restarts also does not seem to have an effect.
How can I debug the GlyphData to figure out “where it breaks” and what could cause this weird line breaking behaviour?
Okay, but even so I have, for example, glyphs with Category ‘Letter’ and Subcategory ‘Conjunct’ here breaking to new rows after one glyph. I removed the sortName altogether to test (I suppose it falls back to name then?).
Order in the GlyphData does not matter, does it? And supposedly Category and Subcategory each force a new “row break” and inside each Category-Subcategory combination the sortName is what matters, if set, and name is used otherwise?
But this still does not seem right. In my above screenshot the selected glyph is named (in my custom GlyphData) dvK, the one above it dvKa and the one below it dvKha.
dvKa and dvKha are both “Letter” / “Letter” glyphs, dvK is a “Letter” / “Halfform” glyph. How come dvKa and dvKha are not on the same row, and how come dvK is between them?
What is the exact algorithm that determines sorting?!
I am assuming category and subCategory have to be one of the GlyphApps define values (or do they?!). I am assuming the sorting is script > category > subCategory > sortName > name. Does GlyphData.xml order matter? When does it use GlyphsApp fallbacks?
Should maybe restarting the app and opening a file also trigger the sorting?
So are may stated assumptions regarding sorting correct? It would be really helpful, if it just said so in the tutorial, if that is indeed the only place this is covered.
Also, is there a way to have some categories twice?
Imagine e.g. wanting to have ASCII first separated in the category of its glyphs, and then later one category after the other.
The order is preserved so that you have a chance when you open an older file and it would sorted differently because of GlyphData or algorithms changed.
You can add your own subCategories. There is a default sorting for the existing categories/subcategories. But you can experiment with your own.
Also, could you just outline what is the sorting logic? It is infuriating tapping around in the dark like this.
I have the same GlyphData.xml content, but I get different sorting results if I a) write them to file in arbitrary order or b) write them to the file sorted by script > category > subCategory > name — should this or should this not be the case and why or what does affect the sorting beyond those attributes?
Also coming back to this. That contradicts what you said above, no? Why would creating a subCategory of things I want to group together not group them together?!
Thanks for clarifying. Folders on Mac sort _ABC and python sorts _ABC so it is not entirely clear to my why that would be. What symbols are you talking of? Does Objective C really sort in a different manner?