Calling data from another layer



  • Hi,

    is there a way to call datas from another layer?
    ex. to draw in the active layer, I'd like to get the x value of a point from anotherLayer of myGlyph:

    myGlyph.anotherLayer.contours[0].points[0].x

    thinking roboFab, there should be a RLayer method or something of that sort, but I can't find one.



  • Thanks, that's what I was looking for!


  • admin

    you can access other layers easily with:

    glyph = CurrentGlyph()
    backgroundLayerGlyph = glyph.getLayer("background")
    

    This returns the glyph object of a specific layer. If the layer doesn't exist a new layer with the provided name will be created.

    see http://doc.robofont.com/api/robofab-extras/

    UFO3 will not be embedded in the next release, but likely be in the next-next release (however I don't want to make any promises)



  • That would be something for UFO3 I believe.
    Is that right Frederik? Any idea if/when UFO3 will be supported in RF?


Log in to reply