Is there a way of keeping the (custom) glyphOrder when Updating Glyph Info? I’d like the renamed glyphs to keep their previous position in the glyph order.
Can yuh reproduce the overlapping rendering? Could you send me the script?
It’s kindof erratic. This one is coming after “Updating Glyph Info” (from the Menu) in a font with +1000 glyphs. Doesn’t happens always under the same circumstances, I couldn’t find out a pattern. I repeated the operation now and only got this:
Then the renamed glyph names must be in the glyphOrder parameter. Or, you do it with EditGlyphData, where you can set a sort attribute.
Agree, but I want to do it without having to type them. I tried something like:
font = Glyphs.font newGlyphOrder =  for g in font.glyphs: g.updateGlyphInfo() newGlyphOrder.append(g.name) # set newGlyphOrder as customParameter
but raises an error:
Traceback (most recent call last): File "<string>", line 4, in <module> File "GlyphsApp/__init__.py", line 267, in __iter__ File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_convenience.py", line 589, in enumeratorGenerator yield container_unwrap(anEnumerator.nextObject(), StopIteration) objc.error: NSGenericException - *** Collection <__NSArrayM: 0x608000a404b0> was mutated while being enumerated.
Always a bad idea to change a collection while you are iterating over it. Not on my Mac now, but try to access and print each glyph’s nice name property. See docu.glyphsapp.com.
Or better yet, use a system service to convert your list to nice names:
I can print glyph’s nice names, therefore set the right glyphOrder,but I can’t updateGlyphInfo at the same time.
Not sure about what you mean by
Always a bad idea to change a collection while you are iterating over it
I only want to change iterated glyphs object’s attributes (previous name for “nice name”), am I changing the object itself in the iteration?
I also read before about system service but this is for other people that will update the previous “not nice” names to Glyphs’ friendly names and I’d like them to keep the custom glyphOrder (running just one script if possible).
So what I want is: change old names by nice names, keep glyphOrder. Should I use another approach?
Many thanks for your help.
It does. You have your glyphOrder as a parameter, right? Just update the text with the appropriate service. It will not change the order.