Vertical Metrics calculator

Primary tabs

16 posts / 0 new
Last post
Craig Stainton's picture
Offline
Joined: 8 Feb 2002 - 11:00am
Vertical Metrics calculator
0

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.

Frode Bo Helland's picture
Joined: 26 Feb 2007 - 1:03pm
0

.

Bert Vanderveen's picture
Offline
Joined: 13 Jun 2004 - 8:19am
0

[Superfluous question deleted.]

Blank's picture
Offline
Joined: 25 Sep 2006 - 2:15pm
0

Good idea!

Jens Kutílek's picture
Offline
Joined: 12 Sep 2007 - 7:55am
0

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 :)

Karsten Luecke's picture
Offline
Joined: 6 Aug 2005 - 8:41am
0

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 ...

Adam Twardoch's picture
Offline
Joined: 3 Dec 2002 - 7:36pm
0

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

Blank's picture
Offline
Joined: 25 Sep 2006 - 2:15pm
0

Thanks, Adam. It works fine on my end.

Craig Eliason's picture
Offline
Joined: 19 Mar 2004 - 1:44pm
0

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

Jason Pagura's picture
Offline
Joined: 10 Sep 2006 - 6:19pm
0

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

Adam Twardoch's picture
Offline
Joined: 3 Dec 2002 - 7:36pm
0

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.

Frode Bo Helland's picture
Joined: 26 Feb 2007 - 1:03pm
0

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

Craig Eliason's picture
Offline
Joined: 19 Mar 2004 - 1:44pm
0

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

Frode Bo Helland's picture
Joined: 26 Feb 2007 - 1:03pm
0

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

Adam Twardoch's picture
Offline
Joined: 3 Dec 2002 - 7:36pm
0

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.

Frode Bo Helland's picture
Joined: 26 Feb 2007 - 1:03pm
0

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.