Show distance and angle

Is there any way to show the angle between two selected nodes? This is one of the few things i really miss from FontLab, being a recent convert to Glyphs.

Hi,
Follow this link and instructions.

Cheers,
Edu

Thank you, this looks like just what I need. I am however unable to make use of it, I would be extremely grateful if someone could walk me through the process.

Edit: I found out. Works great! Thank you so much.

I forgot to register this to the plugin manager. Now I did, so you can use the Plugin Manager in Glyphs to get it. If you do so, please remove your manually installed plugin before (just to make sure you donā€™t clutter your computer with obsolete files)

1 Like

Thank you for making this plugin, I use it all the time. I wonder why this functionality isnā€™t hardcoded in Glyphs, though; I find this tool immensely useful, even essential.

Just a little thought: FontLab reads all the four sides of a regular diamond shape as 45 degrees, while this plugin reads them as respectively 45, -45, 45 and 135 degrees, counterclockwise from top. Personally, I find the FontLab approach more useful for type design, as typical usage is comparing angles of the inside and the outside of a contour.

Iā€™ll have to check what i did back then. Actually I donā€™t use it myself too often, but a diamond shape is indeed a good one to test the calculation. Maybe I can fix this in the next days ā€¦

That would be nothing short of fantastic. Thank you so much!

@Sindre I changed the calculation (literally) half way according to a tip by @GeorgSeifert. Could you please try if it works as expected? If you have it installed via the Plugin Manager, open the PM once, and restart Glyphs. The update should be done then.

The angles in a diamond shape are now 45, 135, 45, 135. No negative values but more logic. Thanks for pointing that out!

Yes, it works fine now. Personally, I would prefer it to show all the four angles of the diamond as 45 degrees, like FontLab does, as it is much easier to compare mirrored angles (for instance in a ā€˜vā€™ or ā€˜xā€™) then.

I understand. I find it slightly confusing though, because it is supposed to show the angles of any 2 selected items. And if it says 45Ā° where it is actually a 135Ā° then thatā€™s not true and rather misleading. Currently the angles are always relative to a horizontal. In what case exactly does FL return 45Ā° angles in all corners? Can you post a screenshot?

I see how this may seem confusing, but in real life, it is no problem. I guess FontLab thinks of the angles measured from left and right sides respectively, so 135 degrees seen from the east will measure 45 degrees when seen from the west and vice versa.

Here you see how it looks in FontLab 5.1:

And this will be typical usage, measuring the inner and outer angles of the arms of this ā€œYā€:

Thanks for the screenshots. I see your point. Maybe I could add one value for the absolute angle, which then is never bigger than 90Ā°. Iā€™m still hesitating to change the currently given angle value, since / has obviously not the same angle as \
So adding an absolute angle could suit everyone. Iā€™m just afraid of cluttering the view then.

How about adding an option to the right-click menu as seen on the Show Crosshair plugin?

Throwing my 2 cents in the conversation, I personally find an absolute angle (90Ā° max) more useful too.

That is a very good idea!

Okay. Is the term Ā»absoluteĀ« angle correct then? Iā€™d make it a toggle between Ā»absolute angleĀ« and Ā»relative angleĀ« then, but Iā€™m confused myself now which is which, haha.

Itā€™s been a long time since I studied this, so donā€™t take anything I say here as the truth.
Having said that, this is how I feel about the nomenclature:

  • absolute angle would be the classic way of measuring from 0Ā° to 360Ā° OR from 0Ā° to 180Ā° and from 0Ā° to -180Ā°;
  • relative angle would be measured from an arbitrarily defined origin, like the plugin behaves right now (relative to the closest horizontal, no negative values);
  • what we are proposing here would be the shortest angle, from 0Ā° to 90Ā° and measured against the closest horizontal.

This probably doesnā€™t make any sense and is completely wrong, but I decided to post it anyways in case it brings you some light or makes anyone else feel compelled to step in to correct me :slight_smile:

I completely agree, you put my thoughts into words. :grinning:

@Sindre @harbortype I added a user preference (and a little line showing the actual angle)

Please try if it suits your desires. Otherwise I can still change things.

I just tried the Y-setup and see itā€™s still not there yet. In the Diamond shape it works as I thought it shall, but I need to get back into the Y-shape ā€¦

Edit
Ah, no, of course the angles of both Y-stems have different values from each other, but the sides of each stem is the same. Or am I still confusing sth here? Sorry for my stupidness.

Edit 2
Hmm, actually it works, but for some reason the order of node selection does matter now (again). I need to get this fixed, itā€™s twisting my mind currently.

Edit 3
Fixed :smiley: please try and let me know.

Great! But there seems to be a little technical problem with the current version of the plugin, it installs just fine according to plugin manager, but does not appear in the ReporterToggler menu*. In the View menu it shows up as Show (null), but nothing happens when I select it. I have de- and reinstalled and restarted Glyphs numerous times, but to no avail. I really hope there is an easy fix for this.

Edit: I run Glyphs 2.5b, the current cutting edge version. Maybe this has something to do with it?

*Thatā€™s yours too, right? Great tool, makes it so much simpler having a bunch of plugins. Highly appreciated!