Centered with Fontlab

André SimardAndré Simard Posts: 166
edited June 2012 in Technique and Theory
Is there a way that I could align some things in fontlab? A tool that gives the possibility to center, left or right align, bottom align as Illustrator do. For instance, select the circumflex accent and the caps A and ask for align center. Your tips will be helpful. Thanks
«1

Comments

  • James PuckettJames Puckett Posts: 1,792
    Nope. But there is a script somewhere in the Fontlab forum that centers anchors, so if this is just for diacritical marks, it’s a start.
  • The user and all related content has been deleted.
  • Thanks for you answers. I will try it (@JMontalbano) or continue my search (@James).
  • Nick ShinnNick Shinn Posts: 1,766
    Actions > Metrics > Center glyph
  • There is the ability to control the alignment of composites in the "alias.dat" file:
    ^ align component to the uppercase position
    ~ do not move component vertically
    < align component to the left of the base glyph
    > align component to the right of the base glyph
    | center component horizontally
    but it does not always work as expected (for me;)
  • @ Nick: Thanks Nick, this action works well with a glyph,but could we do the same with two things – circumflex Accent and letter A – in the same glyph window?
    @ Jan: I will try this suggestion. Thanks
  • edited June 2012
    The first script here, will generate a centered anchor ( I assume this is the one James P was talking about).
  • Nick ShinnNick Shinn Posts: 1,766
    edited June 2012
    Andre, what I do is cut one of the two, centre the other, then paste the first back in, then vice versa. (And then tweak by eye!)
  • Thanks Nick, this action works well with a glyph, but could we do the same with two things – circumflex Accent and letter A – in the same glyph window?
    If you're working smart, these two are probably composite glyphs.

    The first composite glyph is a ghost of A and you don’t have to center that one, since it gets its side bearing from the key glyph A.

    The second is the circumflex accent which also is a component, and that one is centered by default when making the glyph ‘Acircumflex’ by double clicking the empty spot for the glyph.

    After that, you can of course center components by CTRL-clicking on them if they move out of place.
  • There is a lots of good tips here. Thanks to all of you.
  • @ Göran: I get composite glyph either for the letter and accent.
    The second is the circumflex accent which also is a component, and that one is centered by default when making the glyph ‘Acircumflex’ by double clicking the empty spot for the glyph.
    What do you mean by “empty spot for the glyph”? Thanks
  • Mark SimonsonMark Simonson Posts: 1,380
    edited June 2012
    He means like this:

    image

    That gray cell with the template character image is an empty spot for a character. (Except I like to call them slots instead of spots.) If you double-click on an empty spot like that, FontLab will automatically build the composite for you. (It took me years to discover this little trick, so don't feel bad if you didn't know it.)
  • The user and all related content has been deleted.
  • André SimardAndré Simard Posts: 166
    edited June 2012
    @ Mark: Some tips took often years to discover them, thanks to share the one you know :-)
    @ Göran: I have to learn about alias.dat file.
  • The user and all related content has been deleted.
  • Nick ShinnNick Shinn Posts: 1,766
    edited June 2012
    As an addendum to Mark’s post: double-clicking on greyed ligature cells will “set” both components, just like type.
  • I would still recommend learning about and using anchors, the initial investment in extra effort more than pays-off later. If anchors are used they override "alias.dat" positioning instructions anyway.
  • Yep, anchors are awesome.
    The Fontlab manual has nice detailed instructions on how to use them.
  • Kent LewKent Lew Posts: 905

    If you select a component in a composite glyph, then use control-click [Mac] to get a contextual menu, you’ll see a Center command, which will center the component horizontally on the advance width.

    With this, you can potentially get around Nick’s cut and repaste method above (assuming you’re dealing only with components and not outlines).

    In the original example, if you have a capital A component and a circumflex component, you can select each in turn and center. They will then be centered on each other and within the glyph width.

    Then, if the composite glyph as a whole is not intended to be centered, you can select the base component and control-click again and select Copy Metrics to restore the sidebearings from the base glyph.

    All this assumes that your composite wasn’t pre-built centered, as previously discussed. And this is still a far cry from the kind of Illustrator-like align commands that were originally being sought.

    But since we’re talking techniques . . .

  • Good tips James, thanks!
  • I found that even with 'symmetrical' accents such as /cicumflex, /caron, /ring, the dead centre is often wrong, visual alignment is required. Ditto for left and right aligned accents. You can either fiddle all composites by hand, or tweak the anchors once, using the excellent preview tools:

    image
  • The user and all related content has been deleted.
  • Craig EliasonCraig Eliason Posts: 1,176
    Anchor placement is another area where the interface in Glyphs is much more useful than FontLab's. image
  • Nick ShinnNick Shinn Posts: 1,766
    I never use anchors ’cause I can never make up my mind whether acute/grave should be centered or fly off from the bottom, or a bit of both, and prefer to eyeball everything anyway. Keeping it real.

    I mean, with acute it depends what “l” is like, with grave, “f”. So until you see the accented characters in text, it’s hard to know what will be right.
  • RalfRalf Posts: 170
    Using anchors and manual glyph-by-glyph control don't rule each other out. At least not in Glyphs.
  • I think all those tips & technics are good. The choice could depend on a personal decision and probably when you need it in the process.
  • Using anchors and manual glyph-by-glyph control don't rule each other out. At least not in Glyphs.
    This feature also exist in Fontlab, you just have to do not include the glyph in the Generate Glyphs window.
  • This feature also exist in Fontlab, you just have to do not include the glyph in the Generate Glyphs window.
    But then you have to regenerate the glyphs every time when you change the spacing or anchor position. This is cumbersome and you loose all you kerning (exceptions). And FontLab has misplaced my accents several times. So half of the time I was checking the positioning of the accents. This was one of the reasons I started with Glyphs.
  • I try to set the anchors on the accents first, then move the anchors on the letters, then adjust on accents, then generate glyphs, decompose and tweak positions if required. But then, I am always in a hurry to go to lunch or some such. Slack.
  • Ray LarabieRay Larabie Posts: 1,119
    I've used anchors now and again but generally, I like to eyeball accents; it's ritual.

    Rather than double-clicking blank glyphs I use "generate" and copy+paste from a text file with something like...

    A+acute=Aacute
    a+acute=aacute
    A+breve=Abreve
    a+breve=abreve
    A+circumflex=Acircumflex
    a+circumflex=acircumflex
    A+dieresis=Adieresis
    a+dieresis=adieresis
    etc.

    It's much easier to parse than alias.dat and I can customize it on-the-fly. I've got pre-made sets for regular, all caps, small caps, Cyrillic, Vietnamese etc.

    You can use the alignment controls Jan mentioned earlier.
Sign In or Register to comment.