Feature request: Change glyphOrder by drag and drop

As simple as the title. In the glyph view let me drag and drop glyphs (for example when holding a modifier key, to distinguish from selecting) in the order I wish the glyphOrder to be written.

If no glyphOrder is set in the font info, write it automatically in the order found after the drag-and-drop.

The current UI for copying glyph names, opening the font into, going into the glyphOrder list, scrolling around, pasting a glyph name… well, it’s cumbersome and unintuitive.

I’ll see what I can do. But I can’t promise.

What kind of reordering you are doing? I never used a glyphOrder for not legacy projects. There are some other ways to order glyphs (e.g. manually setting the sortName).

Almost without exception projects I work on have foundry specific ordering. Alternates or ss versions next to letters, or after the bulk of that script, or after all scripts. How symbols are grouped, what groups come after others. How ligatures are sorted/grouped.

I suppose there is several ways to achieve that, but what I am suggesting would be a very intuitive and straight forward way of setting the glyphOrder. Seeing as there is no inherent reason glyphs should be ordered one way or another.

I wonder if we can find options to adjust the automatic sorting to get close enough to what you need. I consider the glyphOrder a last resort.

Manually setting the glyphOrder (e.g. by dragging) mill for sure lead to inconsistencies between files. To much hassle to keep everything in sync.

I have a script that sort of does what you want: pastes copied glyph names (space separated) in front of currently selected glyph.

But I agree with Georg, it’s better to automate it based on some system, I only use this script for rare exceptions.

@kontur Can you find some rules that would get you the order you like?
Something like:

  1. sort by category: Letters, Number, Symbols …
  2. in Letters
    • sort by script: Greek, Arabic, Latin …
    • sort by subcategories/case
    • put all alternates directly after the base …
    • use unicode order or by glyph names or base glyph
  3. in numbers, sort by name only (keeping all ones, twos and threes together).

I’ve worked with a custom GlyphData.xml at times to get the basics right, but often it depends on what is in the font where it makes sense to put some alternates etc.

I’ve also worked with a custom script that writes a custom glyphOrder based on some glyphdata/unicode categorisations, but again, that gets you 90%. @alexs’ approach seem interesting as well; just dragging them around would be more intuitive, though :slight_smile:

There is no inherent reason for a font to be in any one order, so I don’t think it’s a matter of finding “the one way” it should sort, always.

What is really the problem with using the glyphOrder parameter?

Dragging in Font view is error-prone, will trigger many unwanted reorders, and it will mean a drastic change in the way Font view works (dragging already has a different meaning), which may help you on this specific problem, but will mess up your (and others) workflow in many more situations.

A way to “force” a smart list that shows all codepoints in a given range to display them in codepoint order would be very useful to have.

A related feature that would let us generate glyphs from smart lists would also be very useful.

  • Copy glyph name, open Font info
  • Notice there is no glyphOrder, close Font info
  • Copy all glyph names
  • Go to Font info
  • Add glyphOrder parameter, paste glyph names, close Font info
  • Copy glyph name, open Font info
  • Search for glyphName, cut glyphName, remember other glyphName before glyphName where to paste glyphName

or:

  • Press [modifier key], select glyph(s) and drag to desired order

The difference in steps and cognitive load required to perform the action is significant.

If you are worried about “mishaps” also acknowledge typos, unwanted undos, copy-paste in the wrong place, back-and-forth checking order etc. that are error-prone with the current UX.

Just because a feature is hard to implement doesn’t make it less valid.

Just want to point out that with the script I shared, you literally just copy-paste glyphs in the main window. Nope, no need to create glyphOrder or do any other steps you mentioned. Drag n drop would be sweet indeed, but at this point it’s really whether you think there’s nothing more important Glyphs team could be doing other than adding drag n drop on top of copy-paste :slightly_smiling_face:

Nvm.