New feature suggestion: snapping to components

I would like the ‘on-curve’ points of components displayed, this is useful when joining smooth parts to corners and both points will share the same tangent to create a smooth line.

Please see this example of a Thai typeface where the corner of a straight shape join the side of a loop:
Example 1a
Example 1b
Example 2a
Example 2b

Could be displayed with a .glyphsReporter plugin.

But what you want is the connection in the right spot, right? Why not use anchors and let the software connect them precisely?

If you send me a .glyphs file containing those four letters, I can show you what I mean: res (at) (this website without www).

if you like to position two components, you can use anchors (as Rainer mentioned).
But for paths that wouldn’t work. I think about it. You confused us a but by saying that you need to BCP: that are the Off curve points.

Georg, Mekkablue, I think j1_designer has a very good point. This would be extremely useful. I still miss the feature of components to be automatically align to at least bounding boxes of each other. The anchor trick is very often too complicated.

But what about this? What if a component could temporarily behave as a vector object. When enabling this feature, the component’s nodes would be displayed and users could align vector objects or other components to it. The components would be locked, non editable, users would just see nodes.

Snapping would be nice addition to this GREAT feature :slight_smile:

Exactly that would make it pretty confusing, GUI-wise. The forum would be full with comments like: 'Help, I found a terrible bug! Cannot select node, you must fix this quickly!'

Snapping without displaying is thinkable.

But still, wouldn’t this encourage people to mix components and paths? The problem is that components will shift once you change metrics on the originals. While sometimes, the shifting is exactly what you want, I doubt it is what you want if you want to exactly align components or paths and components. In these cases, anchors make way more sense, because fixing unwanted shifting is really complicated.

Mekkablue, I think your argument is not convincing. The visible nodes of the component could be gray or semitransparent, users are used to principle of graying for years and no one would be confused. It must be clear it is a component.

I understand your point about the metrics. Yes, snapping components are not an ideal solution for all situations but it may be very handy for building geometrical fonts based fully or partially on components. I am still convinced, this would be a fantastic feature.

I still wonder what it would help you to achieve that you cannot do better in a different way. Can you show me use cases for (a) displaying nodes of a component (b) snapping to nodes of a component in a recent or current geometrical font project of yours?

Personally, I have never needed (a) or (b). And keep in mind that it could get in the way for other users.

@filipdesigniq
I get it.

Mekkable, this image describes both cases:

(a) Displaying a node in the bottom or top of the arch would allow me to quickly place an anchor or guideline (especially using snapping); I use guidelines quite often and I have to zoom in to align guide to a component.

(b) Snapping of a component to a component would make building of this particular letter ‘c’ very easy (the components are not exported in the final font); snapping would also make building ‘e’ from ‘c’ using additional vector rectangles faster, again I have to zoom a lot and align the vector shapes to components one by one and very carefuly.

https://dl.dropboxusercontent.com/u/17944750/eogonek.png

I understand how anchors work, and in this case yes they would be better to use! But there are times when it is too complicated or already too much work to be using anchors, which having a simple gray node would be clear that it is not editible - like filipdesigniq writes.

This is how it is implemented in the latest 2.0.0 (660):

If you drag a path near a component, the nearest node in the component is highlighted. And if you move the path closer, it snaps to it:

http://quick.as/pPvJu6ly

I notice the components do not snap to each other? This is a feature that would be very useful.

Usually you would use anchors for placing components relative to each other.

Can you give an example where snapping (btw what should snap exactly?) would be very useful and anchors cannot be employed?

I have a scenario where I would want component nodes to snap to other components nodes:

I was cleaning up and expanding a Telugu typeface. I did not have source files and there were many conjunct glyphs that are actually built of other glyphs which were expanded.

I had to rebuild them using components, for me at this point I couldn’t see how to use anchors for so many glyphs (1000) and get the positioning right across all conjuncts… I think it was better for me to manually place the components.

Like the Thai example by j1_designer, I often want to line up on-curve points, it would be nice to be able to easily snap them them up to get a smooth line (from curve to straight tangent line). I don’t know if many other users would find this helpful though.

Can you post a screenshot of one of the glyphs with components? I will have a look and what I can do.

http://imgur.com/a/QmhuA