Forcing automatic alignment?

I have a number of composites of diacritics, accents, superscripts, etc. Because those seem not to be in the list of default glyphs that have automatic alignment on, composites of them don’t retain automatic alignment. The problem is, I can’t turn alignment on, no matter what. the command to turn it off is present, and seems to be available, but I can’t force it to engage. Shouldn’t this be the first thing that happens with any component if automatic alignment is enabled? Even if it’s just to get the original width and sidebearings, before then turning it off.

There are a lot cases where you really don’t like auto alignment active by default.

What glyphs and diacritics do you have problems with?

I am not talking about having auto alignment on by default. I want to turn it on, one glyph at a time, or several glyphs at a time, in order to get the same sidebearings and width as the base outlines, in specific cases. It could be any shape, diacritic, or component. The point is to save time by getting the sidebearings and width along with an outline, like you can get in FL. I can’t think why it isn’t even allowed to have it turned on at all.

Carl, I just uploaded a script called Align Components to:

Select (unaligned) compound glyphs, and run the script. It sort of fakes alignment in glyphs that cannot be auto-aligned.

1 Like

Still, could you give some examples about what glyphs we are speaking about? This could help with the reevaluation on what glyphs can autoalign.

Here are 2 examples:

1: uni02CA, in my case, is a composite of acute. it is shifted, so automatic alignment can’t STAY on, but as a way to build the glyph initially, it is helpful if it gets composed with original width and sidebearings. This doesn’t even really have to do with alignment; it’s just importing all the qualities of a component. I would think width and sidebearings of a component would always come in by default; in this case they don’t, AND I can’t force them to be enabled. When building phonetics, of course you want the base shape’s metrics, even though you may be adding a bar, a hook, a loop, etc. Why not for other, non-alphabetics?

2: integral.mir is just integral, flipped. I really don’t want to have to type anything, whether a value or a formula, in order to get the original metrics. That seems so obvious I can’t think why this behavior isn’t default, and why it has to be linked to automatic alignment. They’re not the same thing.

I improved that a bit. Now, if you add a component, the glyph will pick up the width of the component.

I’m a bit confused by this thread, is it possible to force a composite glyph to take the base glyph’s metrics while disregarding what the rest (whether it’s a path or component) adds to the metrics?

I already know for glyphs with anchors set properly automatic alignment takes care of it, but there are occasions when the base non-base glyph (i.e. diacritics) have to be manually drawn – is it possible to somehow to force the metrics to conform to the base glyph?

I had a look at this and it seems to do half of what I'm talking about above, since it reconfigures the metrics based on the base glyph, but doesn't shift the rest of the glyph, hmm

Also secondly,

How does linked metrics work across masters? I’m finding that if I edit one in one master, all of them adopt the same formula? Which is not what I want actually…

You mean combine paths and components? If you want Automatic Alignment, why not use components instead of paths, then?

If you really want to get the base glyph’s width again, just cut the paths (Cmd-A, Cmd-X) and re-paste them (Cmd-V). After cutting, there is only the component left, and the width of the glyph should snap to it.

Because: e.g. for latin, my ogonek components in certain designs must be customised for each letter.

Here’s another example and it’s frustrating me right now: I want to use my nicely drawn superior figures to make inferiors, numerators and denominators out of. I could copy and paste them in, but it is more elegant to make them composites. EXCEPT: The glyph window for zero.inferior insists that it get its widths from the components, which in this case it is certain is “zero” not zero.superior. When I copy and paste composites I’ve already made from the superiors, those come in as full-height figures. Seems like if the component has the name “zero” in it at all, only the full-height zero will be used as a component. This means I have to step through each glyph and place a component by explicit name, and even then, the sidebearings are being hijacked by the full-width version. I shouldn’t have to turn off auto alignment when all I want is for the composites to have the same widths, but be shifted in y.

can you send me the .glyphs file? I don’t understand your setup, correctly. Or do you use scaled versions of the base numerals as superior?

This is what I do for the ogonek situation:

  1. Select the manually drawn ogonek
  2. Contextual menu > Component from Selection, name it ogonek.e, set it to not exporting
  3. Copy & paste the ogonek anchor into ogonek.e and add underscore at the beginning of its name
    Voilà automatic alignment!

This is what I do for the zerosuperior situation:

  1. In a text editor like TextMate or SublimeText, I prepare a recipe:
  2. Copy & paste the recipe into Font > Add Glyphs

But what are you zero.sups made of?

I like to have one set of real outlines in the “superior” slots (0-9), which I can place as components in the Inferior, Superscript and Subscript positions, which I then shift in y various amounts.

The recipe I describe above does exactly that. It creates ‘component copies’ of the superiors.

Fantastic feature!

I think there is a bug in Automatic Alignment: Now, the “enable automatic alignment” script doesn’t work on a single glyph or a range of glyphs, and it’s a Latin alphabetic base glyph, which I thought had automatic alignment by default. I can’t find a way to turn ordinary A-Z a-z automatic alignment back on. Can this be a problem with the version? 2.0.0 (657)

Sorry, I didn’t realize someone had turned off Automatic Alignment for this whole file. The problem we are trying to avoid: How to keep components as they were imported for a small range (Greek Polytonic), while allowing Auto Alignment in other composites? If I just turn Auto Alignment on, those original Polytonic positions are disrupted. But I need auto alignment for hundreds of other composites.

There is a script called Disable Automatic Alignment that does exactly that. Run it on the glyphs in question before you reactivate font wide alignment. It’s in my repository.