Retain glyph order after renaming glyphs

RoboFont Forums Help / General Retain glyph order after renaming glyphs

This topic contains 6 replies, has 2 voices, and was last updated by  frederik 6 years, 10 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5735

    bahman
    Participant

    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?

    Thanks

    #5742

    frederik
    Keymaster

    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.

    thanks!

    #5743

    bahman
    Participant

    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?!

    Thanks

    #5746

    frederik
    Keymaster

    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….

    thanks

    #5747

    bahman
    Participant

    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.

    thanks

    #5748

    bahman
    Participant

    by the way I meant the “Sort Font” checkbox, sorry.

    #5750

    frederik
    Keymaster

    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

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.