calling data from another layer

RoboFont Forums Help / General calling data from another layer

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  B-O 7 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5532

    B-O
    Participant

    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.

    #5533

    Thom
    Participant

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

    #5535

    frederik
    Keymaster

    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)

    #5536

    B-O
    Participant

    Thanks, that’s what I was looking for!

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

You must be logged in to reply to this topic.