Retain glyph order after renaming glyphs

  • Hi,
    Every time I rename some glyphs for some reason, glyph order changes after opening the UFO file. Is there any way that could make this possible to retain glyph order after renaming them without doing scripting?


  • admin

    You can drag and drop a glyph selection to change the order. The drag starts after 0.4 of a sec, to prevent accidentally reordering of glyphs.

    You can also set a glyph order with a script:

    font = CurrentFont()
    # this is a list of glyph names
    font.glyphOrder = ["a", "agrave", "b", "c"] 

    if you changed the glyph order (manually or script) the sorting is disabled.

    There is no glyph index in the UFO data, but each glyph has an glyph.index returning the index related to the glyph order. Please take note that the glyph order in the final font can be different if you don't added .notdef or enabled "Use MacRoman as the start of the glyph order" while compiling.

    Adding or removing glyphs will always alter the glyph order. It is depending on your settings where new glyphs would be added (at the end or somewhere in a sorted position)

    Good luck

  • by the way I meant the "Sort Font" checkbox, sorry.

  • Thanks Fredrik, Another feature that I would love is ordering the glyphs manually by dragging them in the glyphs window. I like the glyphs organized when I work with the font, and during the font development I add some glyphs and ordering them manually is not easy. One question, Is there any data in the UFO file format that defines the glyph index of every glyph and make the glyph order sustainable? because adding and deleting glyphs changes the whole order of the glyphs.


  • admin

    What the "Sort Glyphs" checkbox does is performing a sort after the glyph is being added, if unchecked added glyphs will just be appended at the end.

    In the next update RF will remember which checkbox you have enabled….


  • I'm developing an arabic font and I use arbitrary names for the glyphs. Anyway I used a text editor to order the glyphs and I used it as the character set to sort the glyphs. There is another feature which is bugging me is that when I add a glyph, there is a "sort glyphs" check box that every time I have uncheck it. Is there any way to make it unchecked forever?!


  • admin

    Adding a glyph will change the glyph order, cause the new glyph will also be added to the glyph order.

    If you have a completely different glyph order, you have the elaborate it a bit more.