Typophile

Vertical Metrics calculator

selfbuildtype0 votes

I've put together a document that does the calculations required for cross-platform vertical metrics. The calculations are based on the methods described by John Hudson in this thread: http://typophile.com/node/13081

This document was put together in iWork 09 Numbers and I've exported an Excel version so hopefully all the (simple) calculations have survived intact. Also thanks/apologies to Karsten Lücke who’s diagram I have ‘borrowed’ and butchered for my own needs. The document contains two methods: John Hudson’s original method (under ‘Best Practices’ in the previously linked article) and the revised method suggested by Read Roberts (under ‘Update’ in the article). As far as I understand the jury is still out on which method it is best to use. Default values in the document are all taken from John’s original article and all values are positive so you should manually change them to negative figures when inputting them into FontLab.

Comments, suggestions and reworks are welcome!

EDIT: The forum won't allow .zip or .numbers attachments so I have attached the Numbers version as a .txt file. You should be able to download it and change the suffix to .numbers to successfully open the file in iWork.

Office spreadsheet icon Vertical Metrics Calculator.xls Plain text icon Vertical Metrics Calculator.txt

.

[Superfluous question deleted.]

Good idea!

If you want to take an extra step, make a Python macro out of this so it can be used inside FontLab Studio and set the metrics without manual editing :)

It exists since 2008, buried in a folder because the interface is a bit confusing and one or two options should be removed. Perhaps next week ...

I've written a Python macro for FontLab Studio 5 that calculates the linespacing values using the same method as the one that will be built into Fontographer 5.

It follows John Hudson's recommendations and refines them a bit. It assumes the default leading of 120% and distributes the LineGap so that as little clipping occurs as possible.

I'm planning to add a simple user interface to it, and make it work across an entire family, but the current version only works on one single font:
http://www.fontlab.net/downloads/NewLinespacing.zip

I'll appreciate any feedback.

Best,
Adam

Thanks, Adam. It works fine on my end.

Adam, does this require putting values into the script somewhere before running it?
I just tried running it out of the box and got:
Traceback (most recent call last):
File "", line 136, in ?
File "", line 67, in Calc
ZeroDivisionError: float division

@Adam: Myself being ignorant of Python scripting, could it be possible to adapt a script to this same function in FontForge?

Eliason,

could you send me the font to adam at fontlab dot com?

Cuttlefish,

it should be possible. But I haven't done enough FontForge scripting myself to do that.

A.

Craig, Adam: Did you figure this out? Same issue here.

I honestly can't remember what happened with the issue I was seeing, but trying it now seems to work.

Adam? I’m on the latest Fontlab for Mac.

Frank,

this is very likely dependent on the particular font. Some value gets calculated as 0, and then there is a division -- and you cannot divide by 0, as we know. Please kindly send me the font to adam at fontlab dot com and I'll check out what the culprit is.

A.

I can’t send this particular font, but if I understand you correctly this is because one or more vertical metric values are set to zero? My WinAscent/Descent is zero, so that would explain it.

Captured from web.archive.org on 21 Sep 2019. view this capture