remove Glyph as alt-delete (robofab?)

RoboFont Forums Help / General remove Glyph as alt-delete (robofab?)

This topic contains 1 reply, has 2 voices, and was last updated by  frederik 2 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5169

    joanca
    Participant

    This could be a robofab specific question but as it’s linked to Robofont I put it here.
    When removing a glyph in Robofont via python with “f.removeGlyph(g)” the glyph slot goes away too (as selecting and alt-delete in the font window).
    If I do the same outside Robofont using robofab, when I open the .ufo the grey slots are there.
    Is there a way of removing them too?
    Thanks for your help.

    #5170

    frederik
    Keymaster

    The gray template glyph cells are being build up for new UFOs from the character set in the preferences and for existing UFOs the font lib key “public.glyphOrder” if the lib key is existing.

    You can alter the data in the lib easily with interaction with the UI by:

    font  = CurrentFont()
    
    glyphOrder = font.glyphOrder
    glyphOrder.remove("a") # test before removing a name if its in the list
    font.glyphOrder = glyphOrder
    
    # done
    

    This is sort of what happens when you alt-delete a glyph in the font overview.

    good luck

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

You must be logged in to reply to this topic.