Glyph Labels Not Copying?



  • I'm working on an experiment that copies glyphs into several stylistic sets and moves the points based on their label.

    0_1542994280400_Screen Shot 2018-11-23 at 12.30.45 PM.png

    When I copy the glyph the labels don't seem to come with it. This happens when I manually copy and when I use .copy() in the scripting window.

    0_1542994387466_Screen Shot 2018-11-23 at 12.32.12 PM.png

    0_1542994394840_Screen Shot 2018-11-23 at 12.32.15 PM.png

    The UFO was initially drawn as a UFO 2 and is now a UFO 3, I noticed that many of the points have names that are reflective to the label that they were given. My hope was to use the label instead of name so they could have multiple entries and be affected by a script accordingly.

    Any insight would be appreciated!


  • admin

    hi @micahmicah,

    this is the same bug as in Copy / Swap to Layer deletes local guides — not all types of glyph data are being copied when copying between layers.

    for now, it works if you use font.insertGlyph() or glyph.appendGlyph() instead:

    f = CurrentFont()
    g = f['a']
    # copy to another layer
    g.getLayer('background').appendGlyph(g)
    # copy to another glyph
    f.insertGlyph(g, name='b')
    

    this has already been fixed by @frederik in the source, so it should work as expected in the next build.



  • @gferreira said in Glyph Labels Not Copying?:

    f.insertGlyph(g, name='b')

    Ah wonderful. This worked great. Thank you!


Log in to reply
 

Looks like your connection to RoboFont ● Forum was lost, please wait while we try to reconnect.