Basic rules for bearing

About the placement of glyphs within their boundin box, are there general rules to follow?
I have found that, in general, both the lsb and the rsb of the capital letter A are zero. For the capital letters V and W there are slight variations: just positive, equal to zero, in some cases equal to zero the lsb and slightly negative the rsb.
Now, are there general principles or does nothing prevent me, for example, from setting a positive bearing for A?
Thank you

Comments

  • nothing prevents you from setting positive side bearings for /A. you can trust your eyes based on the space you have set for the other letters... it will also depend on the weight. For Black, the sidebearings of /A will be closer to zero whereas Thin will require much more space. 
  • so in fact is it a question of optical equilibrium, where there are no general and not huge rules of structural opportunity?
  • It's more an art than a science. There are general ideas, as I call them, that provide somewhat of a starting point. Some folks also pursue a scientific approach to letter spacing. That's fine, too. As far as I'm concerned, I space H and O and then see where that takes me. If, as a consequence, the A ends up with positive bearing, then so be it. 

  • In https://glyphsapp.com/tutorials/spacing I read:
    Unless you did something really crazy, the o needs equal left and right sidebearings.
    Aside from the fact that this rule is not followed at least in most serif characters, I should infer that symmetric glyphs (like / H or / I) should also be centered. Which is not in most cases ...
  • Paul Hanslow
    Paul Hanslow Posts: 173
    edited June 2020
    To add to @mauro sacchetto's comment about metrics.

    A serif typeface can often have different metrics for the right side bearing (RSB) and left side bearing (LSB) on 'symmetrical' glyphs such as /H/ and /O/. Glyphs calculates RSB/LSB values from the closes point to a side bearing, so with serif typeface it's the serifs themselves. 

    Glyphs has a clever feature that's not widely known (or used) by many people. You can define a sidebearing measurement from the stem rather than the serif, which allows you to alter the length of serifs without the need to adjust metrics. For example, typing "=H@300" for the LSB of the /E/ will result in the /E/ taking the metic value from the /H/ on the x axis at 300 units. This can be a timesaver as multiple glyphs can be assigned to the /H's metrics value at the stem rather than the serif. It's a quick way of spacing if you're defining stem to stem values for serif typefaces. The same works for the /oslash/ if the extreme points of the slash are wider than the /o/. It sounds confusing but it's easy to get understand when attempted.

     

  • I don't work on apple, so I can't use Glyphs :(
  • You'ed like probably watch that: How to Space a Font. FontLab Studio 5 tutorial with Thomas Phinney. https://www.youtube.com/watch?v=tbc_O7bNROs
  • Here is a tutorial about how to generate the metrics:

    Basically you click a button and wait a minute to get these results:

    One line shows the original and the other line shows the one made with the generated side-bearings. Maybe not perfect, but a good start.
  • Aside from the fact that this rule is not followed at least in most serif characters, I should infer that symmetric glyphs (like / H or / I) should also be centered. Which is not in most cases ...

    Regardless of the font editor, serif fonts' spacing should always be measured from the stems, ignoring the serifs. This may be what you are seeing when you say most serif characters like /H are not centered. They very likely are -- when measured to the stems.


  • mauro sacchetto
    mauro sacchetto Posts: 353
    edited June 2020
    I gained very useful information from Pinney's tutorial.

    I downloaded FontCreator and now I try this function on my Windows partition (usually I work on Linux).

    In addition: the side bearing for the lower case must first be fixed. In a second moment the one for uppercase. However, since the words in capital letters are very few and in general a capital letter is followed by lower case, it is more important to arrange (before going to kerning) the all uppercase or the uppercase / lowercase sequence? Or is the latter phase mainly played with kerning?

    @GeorgeThomas
    Precisely because in serif shapes are asymmetrical, which point should I consider as a starting point for measurement? For example, in the glyph of this / M where do I identify the starting point for lsb and rsb?

  • As with any "rule" there are always exceptions. In this case, the /M is one of those. The spacing for it I would optically balance using this string: HHMHHOHOOMOO
  • The result is this:

    It seems quite symmetrical, but the glyphs seem a little too "close" and such as to give a larger bearing, at least for capital letters

  • It must be also taken into consideration that in monospaced fonts increasing the spacing by one unit requires the black body width to be reduced by one unit, and vice versa, and that monospaced fonts do not use kerning for the spacing so each spacing is always the same. In proportional fonts, awkward character pairs have to be kerned, but monospaced fonts are supposed to have no awkward character pairs, so they must be designed in an optically correct way (as long as it's a general-purpose font).
  • I understand it as general principle, but I'm working on a serifed not monospaced font.

    PS
    The scope of font design seems to me to be poorly documented. There are interesting web pages with guides and tutorials.
    But: is there is a systematic, updated and broad text, as there are many among others for PHP or LaTeX?
  • John Hudson
    John Hudson Posts: 3,186
    Precisely because in serif shapes are asymmetrical, which point should I consider as a starting point for measurement? For example, in the glyph of this / M where do I identify the starting point for lsb and rsb?

    I find it important to establish a standard height for sidebearing measurement, that is then used not only across all the glyphs in a font, but also across all the fonts in a family. This is the only way to obtain consistent relative spacing between regular and bold, roman and italics, etc.

    For a typical Latin typeface with caps and lowercase, my standard spacing height is usually somewhere around the midline of the x-height letters. That is then useful for all the lowercase letters with stems and bowls, and often for diagonals, and for uppercase letters with stems and usually diagonals. Uppercase letters with bowls are usually exceptions that I space with sidebearings off the extrema, and letters with apertures like C E F L, etc. need to be spaced by eye.

    FontLab has a 'measurement line' that can be set and fixed at a standard height across a font, which is very useful for my method. 
  • John Hudson
    John Hudson Posts: 3,186
    BTW, in the case of an M with traditional stroke modulation, so a thinner stem on the left side and a thicker one on the right, I find that the sidebearings should not be symmetrical, but should be slightly less on the left. This is because the thinner stem means there is more white space relative to black within and around that area of the letter, so I want to reduce that white space slightly to compensate for the effect.
  • mauro sacchetto
    mauro sacchetto Posts: 353
    edited June 2020
    @JohnHudson
    Thank you for your always precious informations.
    my standard spacing height is usually somewhere around the midline of the x-height letters
    consequently, to be concrete, in the case of this glyph, how exactly do I calculate the standard space?


    PS
    As written before, do you have any updated text / guide to report on the font design?
  • John Hudson
    John Hudson Posts: 3,186
    The irony of something called x-height is that the letter x isn't a very useful letter to determine anything happening within that height.

    I typically start out by putting the spacing measurement line a little more than halfway to the stem of the lowercase i. Then I check where it is sitting on the lowercase o. Presuming the o has curved sides, I try to find a height at which the left and right sidebearings at the measurement height would be equal on both sides.
  • Craig Eliason
    Craig Eliason Posts: 1,436
    Mauro, it seems like you're asking about the numbers that will produce the right spacing, but to me the process is finding the spacing (by eye) and then using the numbers that result. 

    As far as I understand, the measurement line is only handy insofar as it gives a quick way of insuring that other letters with identical (or sufficiently similar) side shapes get related sidebearings. If the sides of /x/ are unique, then taking that measurement doesn't matter, as that info won't be carried to other glyphs. Just make nnxnnooxoo look good. If, say, your /k/ is quite similar on the right side, then linking the sidebearings of the two glyphs might be called for. In that case the sidebearings can be measured at any altitude where the shapes are identical (or sufficiently similar). (These measurement-line sidebearings are all just tools within the font editing app, of course, which will in the end write the technical sidebearing and advance width to the font file.)

    But maybe I'm missing something. I confess I don't follow @John Hudson's note about using a measurement line to insure consistency across fonts in a family. Is the idea there that sidebearings of flat-sided and round letters are similar in proportion to each other? (It seems obvious to me that the differing shapes of sloped or emboldened glyphs wouldn't call for direct reuse of sidebearings.)
  • John Hudson
    John Hudson Posts: 3,186
    edited June 2020
    Craig:
    In that case the sidebearings can be measured at any altitude where the shapes are identical (or sufficiently similar).
    Not quite. The point of having a standard measurement height is to enable consistent relative spacing across fonts in a family, and the reason why this should be somewhere around the middle of the x-height is so when a word in italics is set in the midst of roman text, or vice versa, it is optically evenly positioned between the adjacent words. Since lowercase letters provide the dominant content of text, the x-height provides the context for such spacing.

    It seems obvious to me that the differing shapes of sloped or emboldened glyphs wouldn't call for direct reuse of sidebearings.
    Not direct, relative or, as you put it, proportional. So taking italic uppercase H as an example, if I have equivalent LSB and RSB in the roman H at my fixed measurement height, that is the same height at which I want equivalent LSB and RSB in the italic H, even though the actual measurement may be different (usually just slightly narrower, depending on the relative proportion of roman and italic letter widths).

    Modern font tools tend to have an option to view slanted sidebearings in italics, but I still want to know the height at which measurements between stems and actual sidebearings are calculated.
  • Craig Eliason
    Craig Eliason Posts: 1,436
    Ah, okay, I'm always working in Glyphs with its slanted box for italics, so I'm less conscious of the spacing confusions that come from a sloped glyph in a rectangular container.
  • Joachimvu
    Joachimvu Posts: 2
    @Craig Eliason Glyphs slants its bounding box from half x-height, so by default you're doing pretty much what @John Hudson is describing. The limitation is that if you don’t want to fit your italics that way you have to shift all your glyphs at export time (or be willing to work with asymmetrical sidebearings).
  • @mauro sacchetto
    It is also worth considering the purpose of the typeface. For example, the text fonts are needed more white space between black shapes so its sidebarrings are looser comparing to display fonts.