linebender / runebender

A font editor written in Rust.
Apache License 2.0
760 stars 36 forks source link

Add an option to change the first segment (node) #174

Open eliheuer opened 3 years ago

eliheuer commented 3 years ago

This option could just be something in the paths menu with a label like "make selected node first".

This would be useful for a variety of reasons, but mainly it is important for variable fonts. If two paths have the same point structure, but different first segments, the interpolated in-between shapes will be twisted and unrecognizable.

Maybe I could figure out a PR for this using src/draw.rs/draw_direction_indicator as a starting point.

raphlinus commented 3 years ago

This is a good feature to have. One question to resolve is how it's invoked. Glyphs seems to surface this primarily through a context menu, which is possible but I think involves some more hit-testing logic to figure out if the right-click is on a point. An easier possibility is "make selected point first," but this is only going to be meaningful when there is one point selected. (Or, more generally, one point per contour)

cmyr commented 3 years ago

We need to do better context menu stuff anyway, so this could be a good excuse for that.

eliheuer commented 3 years ago

My first instinct is to select a node and right-click on it looking for a context menu. It would be nice if “reverse contours” from the Paths menu was in the same section of the context menu as well.