Transform Components

RoboFont Forums Features Transform Components

This topic contains 3 replies, has 2 voices, and was last updated by  frederik 7 years, 8 months ago.

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

    Jens K.
    Participant

    It would be great if components would be affected by transformations, at least scale/mirror. It is a bit cumbersome to edit the transformation matrix directly in the inspector window ;) Or is there an easier way Iā€™m missing?

    #5413

    frederik
    Keymaster

    The transformations are saved and stored as a transform matrix [xx, xy, yx, yy, x, y] and when ever there is a rotate or skew transform its impossible to revert the matrix back to readable, understandable and simple values like position, scale, rotation,….

    This can help to transform components: Use the transformation pane in the inspector, but be sure you enabled “Transform Components” in the transform pane option menu.

    or with code:

    g = CurrentGlyph()
    
    for component in g.components:
        center = (100, 100)
        component.rotate(50, center)
        # component.transalte((100, 100))
        # component.scaleTransformation((.3, .3), center)
    
    
    #5415

    Jens K.
    Participant

    Ah, sorry I was blind, I didn’t find the “Transform Components” setting in the transform panel ;) Great!

    #5416

    frederik
    Keymaster

    It’s disabled by default cause transforming multiple glyphs can end up with a double transformation on glyphs with components, one time by the referenced glyph and other one by transforming the component itself.

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

You must be logged in to reply to this topic.