How to guarantee consistent font export between Windows and Mac

I finally have a solution to this problem, and I’m posting it here in the hopes it can save others some time.

In short: a significant number of fonts have inconsistent metrics between their WinAscent/WinDescent and Ascender/Descender/Line Gap values. Since Dorico does not use typo metrics for font rendering, but rather the dedicated Windows and Mac metrics, this causes fonts to appear differently when projects are opened and exported cross-platform.

The solution is as follows. Here are the default metrics for Minion Pro:

You can see that the values for Win Ascent and Win Descent (used on Windows) don’t match the values for Ascender, Descender, and Line Gap (used on Mac).

To make Mac output match Windows, simply set the values for Ascender and Descender to match Win Ascent and Win Descent, and set Line Gap to zero.

Here’s the result in Dorico, checked at a large point size to make sure it’s exact. Both outputs are identical. The file was created in Windows, then checked on Mac:

Line leading also displays correctly now:

What I have not yet tested is how to make Windows match Mac. I imagine if you were to keep a value for line gap, the Win Descent and Ascent would have to be adjusted proportionately. Perhaps in this case, adding 100 em units to each to split the difference of the line gap. But I’ve had enough of this, and I’ll leave it to someone else to test that.

This probably goes without saying, but you’ll have to edit the metrics in a font editor, export the new font, and install it on both systems. Caveat emptor.

Since Dorico calculates line leading based on ascenders and descenders, I imagine these values are particularly important to get right.

Anyways, I’m very relieved to have this fixed, since I’m thrilled with Mac on laptop, but I want to preserve my many files created previously on Windows. Hopefully this helps others in a similar cross-platform situation.

10 Likes

It might be worth bringing this up on a dedicated font forum, where experts could weigh in with any concerns or thoughts. (If you haven’t already.)

I am on the FontLab forum, so I could mention it there.

1 Like

That would be great. I raised it on the Font Creator forum (the program I use on Windows), and I didn’t get much help. It’s pretty specialized, so I don’t know who else to talk with about it.

I encountered similar problems with FontCreator v3.5 and FontLab v5 in 2005 when I used to license my old NorMusic fonts to Gvox (Passport Design) for use with their notation software, my fonts were clipping on Windows, I then have realized that the BBox bottom (Safe top) must match the Descender and the BBbox top (Safe bottom) must match the Ascender, of course the Gap would equal to zero.

Below one of my SMuFL font opened in FL8 with default values from FL8:


Note: FL5 and FL8 have the advantage to dictate the BBbox top/bottom values, I don’t remember if FC3.5 have had that feature but I believe there was a Calculate button that provided that.

This is how I export all my fonts either text or SMuFL, by matching the BBox Top and BBox Bottom to Ascender and Descender. This way, you avoid font clipping on both OS:
(I use the same process sometimes on Glyphs3 app.)

3 Likes

Coming back to this, I noticed this flag in FontLab’s dialog for setting font parameters:

This flag is “Recommended” to be on by FontLab, but almost never is in any of the fonts I’ve looked at.