I am trying to implement a “Zoom to Selection” script. For this, I want to set the
viewPort of the current tab. However, in Glyphs 3 setting the viewport origin also affects the viewport size which breaks my script. The following code-snippet demonstrates this:
editView = Font.currentTab target = editView.viewPort.copy() target.origin.x = editView.viewPort.origin.x + 50 editView.viewPort = target
This also affect other scripts like “Edit Next Glyph” of the Freemix collection.