Forcing automatic alignment?

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:
    zero.sups=zero.sinf
    one.sups=one.sinf
    etc.
    or
    zerosuperior=zeroinferior
    onesuperior=oneinferior
    etc.
  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.

Revisiting this because there is a slightly different circumstance to consider: I already have the glyphs named “zero.superior” and “zero.inferior” made in my file. If I use Rainer’s recipe, Glyphs gives an error message that they exist already. So I can’t use the recipe unless the glyphs DON’T exist. In FL the simple solution was one of the many conditions of Paste Special: Paste as component. In this situation, it really would be simpler for me to use Paste Special to get composites of my numerator outlines into the other glyph positions and then transform their positions. Writing, or saving such a formula would be more fuss, because I might not have the same outlines to start with in a different file.

Since Carl revived the thread I’ll jump in, too. In Kannada it’s possible for a glyph to be built from multiple components that contain a base anchor that one or more other components can attach to. For example, ya includes a circle, two instances of the u vowel mark, and a headline. It’s likely that all but the circle are components, and the circle might be as well. The headline attaches to the first u mark, but there are also one or two other components it could anchor to. And ya can be used as a component in yaa by adding the aa mark to the second uu. If would be nice if I could choose an anchor from among components when putting such complex glyphs together.

Are you saying the glyphs exist, but are empty, and you need to fill them with components? What is wrong Cmd-Shift-C to insert components? And you can copy and paste components if you need the same component again.

Yes, Rainer, that is correct. The problem with your method is scale: I typically make numerators as outlines, and then I want to copy the whole set of 10 to denominators, and superiors, and inferiors, and then I want to shift them (with transformations). Also, it is very likely that my file has 2-8 masters in it, so I’d like to get everything from all masters pasted in as composites, with the original metrics. So in this scenario, inserting one component, then copying that and pasting that into other masters, one at a time, for each of 10 glyphs, 3 times over, is not efficient.

Why not deleting the existing glyphs? Not ideal, either. I have a look how to improve this.

Just bumping this topic because I need to make my inferiors, denominators and numerators in two Multi-master files, and am hoping to do it quickly…

What exactly was the problem with overwriting the existing glyphs? If you can delete or rename them (as a backup), I would suggest compound copies as above, Glyph > Add Glyphs (Cmd-Shift-G):

one.numr=one.dnom
two.numr=two.dnom

… and so on. Then I would set the metric keys to =one.numr, =two.numr, etc. Then I would move them down with Filter > Transformations > Transform, and Glyph > Update Metrics (Cmd-Ctrl-M). You could also automate that with a simple script. Is that