Node alignment

We will move topics to this forum, once we've implemented the requested feature(s) and/or enhancement(s).
Post Reply
MikeW
Posts: 625
Joined: Mon May 20, 2013 2:51 pm

Node alignment

Post by MikeW »

It would be beneficial if when two or more nodes are selected that there be keyboard shortcuts for alignment.

For vertical alignment:

l = left
c = center
r = right

For horizontal alignment:

t = top
m = center
b = bottom

Edited to incorporate BP's suggestion for horizontal center alignment...
Last edited by MikeW on Sun Nov 27, 2016 5:43 pm, edited 1 time in total.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Node alignment

Post by Bhikkhu Pesala »

I agree that this would be useful. Node alignment is a common task that takes rather too long with the Align Toolbar, and I often make the wrong choice.

Shortcut c is currently used to switch to colour mode, but I see no reason why it cannot serve two functions, depending on the context. Shortcut b = Paint Bucket in Colour mode.

I think m = middle would be better than having two items called center.
Align Middle.png
Align Middle.png (11.8 KiB) Viewed 12528 times
The following single-key shortcuts are already in use in the Glyph Edit Window:-
  • N = Change selected points to on curve
  • F = Change selected points to off curve
  • G = Add guideline through two selected nodes, or add orthogonal guidelines at a single selected node
  • A = Add points after selected points
  • O = Toggle Fill Outline
  • H = While pressed down, hides everything except the glyph
  • Q = Select previous contour/point index or composite glyph member. Use SHIFT to add to current selection.
  • W = Select next contour/point index or composite glyph member. Use SHIFT to add to current selection.
  • P = Toggle between point and contour mode
  • C = Toggle between standard and color mode
  • K = Knife (not in color mode)
  • M = Measure
  • B = Paint bucket (only in color mode)
  • / = Fit to Window
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
MikeW
Posts: 625
Joined: Mon May 20, 2013 2:51 pm

Re: Node alignment

Post by MikeW »

Yep, I read the help about the shortcuts already assigned. And context would take care of the overlap as mentioned.

m would work, thanks.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Node alignment

Post by Bhikkhu Pesala »

MikeW wrote:Yep, I read the help about the shortcuts already assigned. And context would take care of the overlap as mentioned.

m would work, thanks.
What if one is editing a colour glyph outline, selects two or more nodes to align them, then presses c or m? How does FontCreator know if the user wants to align the nodes, preview the edited glyph in colour or measure the distance between nodes?
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
PJMiller
Top Typographer
Top Typographer
Posts: 977
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: Node alignment

Post by PJMiller »

Bhikkhu Pesala wrote:
MikeW wrote:Yep, I read the help about the shortcuts already assigned. And context would take care of the overlap as mentioned.

m would work, thanks.
What if one is editing a colour glyph outline, selects two or more nodes to align them, then presses c or m? How does FontCreator know if the user wants to align the nodes, preview the edited glyph in colour or measure the distance between nodes?
I think that the alignment functions are more used and useful than the colour functions so it would make more sense for the alignment functions to get the keystrokes because it wouldn't be that much hassle for the colur functions to be available only from toolbar buttons or menu items.
MikeW
Posts: 625
Joined: Mon May 20, 2013 2:51 pm

Re: Node alignment

Post by MikeW »

Yeah, what he said...

The obvious, fuller, and unfortunately for Erwin more work, solution is to allow customizable keyboard shortcuts. However, the ability to customize keyboard shortcuts allows the best option. Even if there was no interface in the UI for doing so (which is a large part of the making it possible), keyboard shortcuts could be made available in an .ini file any person could edit and FC could read that .ini file and populate the variables at start-up.

While it might seem unprofessional, it's how we all programmed back in the day for various user-configurable features.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Node alignment

Post by Bhikkhu Pesala »

This is, in effect, implemented now. Not with shortcut keys as requested, but with access keys. For example, to align the selected nodes to the Top:
  1. Press Shift F10. This will display the context menu at the current mouse cursor position
  2. Hit access key "b" to show the Align or Distribute submenu.
  3. Hit access key "t" to align the nodes to the Top, "b" for Bottom, "m" for Middle,
    etc.
It does take three key presses instead of only one, but it does not require the use of a mouse, and one only needs to remember Shift F10 (or the Menu Key, to the left of the Control key on the right of the keyboard). Shortcuts are precious and it's hard to avoid conflicts while keeping them easy to remember.
Align or Distribute Access Keys.png
Align or Distribute Access Keys.png (36.38 KiB) Viewed 12310 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply