Feature request: Make outline and metric editing side-aware

Glyph editing is still 100% euro-centric in Glyphs, despite writing direction choice.

Copying/pasting outlines as well as editing the glyph width via the text field in the little info panel below the glyph is always bound to the left edge of the glyph.

But oftentimes I want to copy/paste an outline part for an Arabic glyph. When the source and target glyph have different widths, the outline automatically ends up in the wrong place.

Similarly, adjusting the width via the text field to a precise, known value moves everything around when I really just wanted to LSB to increase.

Solution: The edge/corner choice interface already exists in the transform panel. Please make copy/paste and width editing (those I can think of at the moment; there may be more) respect the chosen edge and calculate insertion locations from that edge.

That is already possible.
Nodes have a “orientation”. You can set that like this:

for n in Layer.shapes[0].nodes:
	n.setOrientation_(1)
Left = 0
Right = 1
Center = 2

I’ll check if that can be enabled on the layer or for all RTL glyphs.

That’s not what I’m asking for, tho.

I’m asking for the user having a choice through the user interface.
Nodes don’t need to have an orientation for that, that’s way too complicated.

What you’re saying is that you will make that choice for the user, and that’s not a good idea. What if I want to use the same for Latin glyphs, icons, ornaments? Don’t make that choice for the user. Arabic was just an example.

The orientation property is about not making a choice for the user, but instead giving the choice to the user.

Georg said that he wants to look into setting it automatically.

Anyway, since I can’t set that property in the UI, I don’t know why we’re debating it.
I’m looking for a solution for quick editing: click, done. I don’t need nodes to have an orientation property, especially when it’s invisible.

This all is another classic example for how to solve something from an engineering perspective. I’m a user here and I want to use something with one click, not write code to engineer something.

Correct, the per-node orientation is highly customizable, but tedious if you want to apply it quickly aka “click, done”.

That is why having the property assume different value depending on the glyph writing direction or a per-layer setting would speed things up aka “done, no click needed”.

And if you want manual control with a UI, than it becomes a UI design decision. Select some nodes and click a set-orientation-(leading/trailing/center) button in the palette aka “click, done”.

Or not three buttons in the palette, perhaps a keyboard shortcut. Or both. Or something else. But to decide that, it would be good to better understand the workflow and also have input from other users that have similar requirements so that the UI does not fit just a single workflow.

What is the orientation used for at the moment?

I added the orientation for exactly your use case but never got to makes the UI for it.

Okay, in this case I seriously propose to discard the orientation property entirely (for the time being) and just implement outline operations that respect the side chosen in the transform panel:

  • In a shape copy operation, the distance of the selected shapes to all four borders (L, R, T, B) is calculated and stored. (All four to avoid confusion when the border side is changed between copy and paste operations. Obviously, top and bottom are only necessary for vertical fonts, left and right only for horizontal)
  • In a shape paste operation, the shapes are placed at the saved distance from the border that’s currently chosen in the transform panel.
  • For manual width manipulation through the text field in the UI, the chosen border in the transform panel will be used as the resting border, while the respective other side’s sidebearings are being adjusted. (No need to implement this in the Python sidebearing actions as here it’s easy to calculate for anyone)
  • In time, more operations will be found that should react to the side choice.

I think that the orientation property is not only unnecessary, but may also lead to further confusion: What happens when new shapes are being drawn in the same layer that don’t get the same orientation property? Does the drawing then explode when sidebearing are changed because some paths move rightwards while others stay where they are? Please don’t do that. Keep it simple and just calculate positions based on UI choice when the user actually requests an operation, and keep the nodes dumb otherwise. And most importantly, please don’t make these choices for the user.

There is a reason that I didn’t propagate the feature. One place that would make sense is for the n odes that make the connection to the right (for medi and fina glyphs). That would allow (small) adjustments of spacing without the need of manually adjustments.

The copy paste alignment need it’s one setting. I’ll think about it.