Typophile

Monospaced Font - Sidebearings

Vít Šmejkal

Hello everybody,
I'm trying to make a monospaced version of my recently released font Orca Pro and I don't how to correctly set widths and sidebearings.

Let's say I want to set all glyphs to be 600 units wide, but so that they keep their relative sidebearings from the original font (e.g. the left sidebearing of letter "L" would be quite bigger than the right one).

There are just few options how to set set width in Fontlab:
- center glyph
- align to left or right sidebearing
- keep as it is

Unfortunatelly none of these options works for me, unless I make it manually glyph by glyph, which would be horribly tedious work.

Any help would be really appreciated.

Many thanks,

Vit

Set all glyphs to 600 (or whatever).

Example; for similar values of straight and curved sides: Select and centre glyphs H, O.

Create metrics classes for left straight sides of H: B, D, E, F, I K, L, M, N, P, R

Right straight sides of H: I, M, N.

Left curved sides of O: C, G, Q

Right curved sides of O: D, Q

Do this for all glyphs with similar values, then you only have to alter the value of the base glyph to apply it to the others, plus some manual adjustment.

Thanks Nick,
this would certainly help, but it is not as handy as I was wondering.

There are going to be 8 fonts and quite a lot of glyphs, many of them non-standard (like &, numerals, some lowercase letters etc.) and it would still be quite tedious work.

In fact the issue is pretty simple:
desired width - original width : 2
(and then add this value to both left and right sidebearing)

I have been wondering whether there could be some macro script or perhaps some trick using action-set or so?

Vit

Optically centering something like an L is not a math thing. You can't solve it like that, and yes this is going to be a quite tedious. Type design is a quite tedious. Poor type design is easy.

I have been wondering whether there could be some macro script or perhaps some trick using action-set or so?

Yes, you can reset the widths mechanically…

from robofab.world import CurrentFont
font = CurrentFont()
targetWidth = 600
for glyph in font:
    widthDelta = targetWidth - glyph.width
    glyph.leftMargin += int(widthDelta/2)
    glyph.width = targetWidth
    glyph.update()

…but what you'll find is that the contours of many glyphs, especially the widest and narrowest ones, will want to be adjusted to fit the width properly.

…which would be horribly tedious work...

The problem is that the optical center is, arguably, more important in monospaced fonts, and it's the spacing element least amenable to automation. So IMO you're stuck with the tedium.

Also, you may want to consider redrawing some of the glyphs for monospace function ("adjusted" as Matthew says).

On the bright side, no kerning!

What I said before is wrong; this is a monospaced font so that method doesn't apply.

Just centre the symmetric glyphs as a start and do the rest by eye.

Enter these in the metrics window after centering symmetric glyphs.

HAHBHCHDHEHFHGHHHIHJHKHLHMHNHOHPHQHRHSHTHUHVHWHXHYHZH

OAOBOCODOEOFOGOHOIOJOKOLOMONOOOPOQOROSOTOUOVOWOXOYOZO

Thank you all!
I definitelly agree with you: type design is tedious work and I know there are no miraculous tricks. I have been working on the source font Orca Pro over 2 years and it was never ending story. You can always find a new kerning pair to add or a detail to fix.

As well I know I need to completely redraw a lot of glyphs (like M W m w @) and fine tune position of some extreme letters like L J P...

However as for the metric itself I belive this macro Butterick mentioned could do maybe 70-80% of the raw work.

Butterick: I'm not very experienced with Python macros - should I save the script you posted as a PY file, install Robofab.World and it should work then?
________

Anyway this is my first post on Typophile and I am very glad there are so many people interested and willing to hlep - thank you! May I ask for your opinion about Orca? This is my very first release and I'm pretty excited how pleople will react!

@frode frank:
Optically centering something like an L is not a math thing.

Yes, but the way I understand the original post, he already knows this. But he has painstakingly optically centered each glyph in the proportionally-spaced version of the font.

What he is asking is if he can keep the hard work he has done for that font, and copy it over to the monospaced version.

Yes Quadibloc - you hit the nail :)

What he is asking is if he can keep the hard work he has done for that font, and copy it over to the monospaced version.

The spacing paradigm for proportional and monowidth is not the same.
Optical centering plays a larger role in monospace.

In theory, there are (at least) three letter spacing parameters:

1. Proximity distances, e.g. to avoid extremity collisions
2. Counter space, i.e. the white space between glyphs
3. Optical centre

Butterick: Voila - I have just installed Robofab and the script seems to work :)
However it does not work with composites and hints properly - do you thin there is some way to do it?

If not, I could try to decompose everthing, run the script and save it, and then I could try to copy and "paste special" sidebearings values to the original font - it could work.

Anyway it could be great and quite simple to have it implemented in the new FontLab version - does anyone know if there is some "wishlist" for upcomming release?

The thing is setting proportional shapes into a standard width and making sure they are optically centered isn't going to give a great result. The reason is that to make it work you will end up with a hideously widely spaced font. Instead, you probably want to squash that w and extend that i rather than leaving the i floating in whatever space is wide enough to fit everything.

I suggest that you begin with your n & o and at slightly wider glyphs like d b p q and find your base width from these. You can probably live with adding a bit of extra space around the o and leave it alone for now. Next begin adjusting shapes so they fill this new space evenly. You may need to expand your s and maybe your a. Compress your m. And so on.

This will be fairly intensive design work for certain glyphs - but that's how you make a real monospace.

Best wishes!

Thank you all - let's start :)

Captured from web.archive.org on 5 Jan 2015. view this capture