Fontlab, Open Type and generating fonts - expert advice or tutorial

Niels's picture

As a small foundry we have developed numerous typefaces and are in the process of converting all our fonts to open type. The problem we are having is that our kerning pairs (although displaying fine in the metrics/kern window) are not making it into our otf file, or it appears that way when loaded into indesign and illustrator. What we are looking for is an online tutorial or some expert advice into generating reliable, complete, and of course cross-platform font files.

Any thoughts or suggestions would be most appreciated.
(we are running Fontlab 4.5)

Niels Oeltjen
Letterbox

Village's picture

Niels, this has been covered here somewhere before, but...

You need to add a second OT feature to your files. For some buggy reason, fonts which only have a kern feature do not access that feature. The most common solution is to add the "basic" ligature feature for fi and fl substitution.

Let us know if this works for you.

twardoch's picture

It's important that the second feature is of substitution type. With just the "kern" feature, only the GPOS table is included in the font file, and no GSUB. However, falsely, InDesign CS2 only checks for the presence of the GSUB table, and if there is none, does not process any OpenType features. Something like:

feature liga {
sub f i by fi;
sub f l by fl;
} liga;

would help out as this will ensure that a GSUB substitution table is included in the font file. I have requested that in the next version of AFDKO, an empty GSUB table is always included even if there are not substitution features are defined by the user.

Adam Twardoch
Fontlab Ltd.

charles ellertson's picture

A small quibble: There are a number of fonts where either there are no f-ligatures, or shouldn't be (cap/small-cap fonts come to mind). If you use f-ligaturing, then any letterspacing you use runs into a bump with the ligatures. The most innocuous candidate I've found is "zero" "slash" "zero" to percent.

twardoch's picture

Charles,

I don't think a replacement of "0/0" with "%" makes any sense at all. But if you think it's a good idea, what feature would you associate this with?

A.

charles ellertson's picture

Adam, you're right, I should have listed the feature -- it is the fraction feature, which FontLab (5.0) will generate automatically. If there are no fractions, you can use

@SLASH = [slash fraction];
feature frac {
sub zero' @SLASH' zero' zero' by perthousand;
sub zero' @SLASH' zero' by percent;
} frac;

It doesn't have to be a ligature feature -- Anything that generates a GSUB table will work, and fractions, which aren't on by default, are a safer substitution. If there is no "perthousand" in the font, just kill that one (actually, FontLab just won't generate the routine if it isn't in the font).

Charles

Christopher Slye's picture

I believe it's also perfectly fine (spec-wise) to substitute a glyph for itself, so you could have something like:

feature lnum {
   sub zero by zero;
   sub one by one;
   # and so on...
} lnum;

I'm sorta working off the top of my head here, so maybe there's a good reason to not do exactly that, with lnum; it's just an example of an approach worth mentioning.

(In fact, I think the feature file "ignore sub" statement ends up in an OTF the same way, i.e. ignore sub a b' ends up being sub a b' by b, so perhaps a single ignore sub statement is also an option... not that I've actually tried this yet!)

Niels's picture

Thanks Adam and Village, your suggestions worked a treat!

All fonts working and now available at
www.letterbox.net.au/store/

Niels

thisisgrey's picture

Please help.
I've added the ligature feature but I still cant see my kerning... My first serious font is frustrating me to death

thisisgrey's picture

Its solved, I have been looking for more info in others threads and you were right and I finally made my kerning into Indesign CS2... tnx

Miguel Sousa's picture

BTW, using the 'frac' feature to access pre-composed fractions is a bad practice.
It's true that it's handy for the user, but by doing so the input character stream (one;slash;two) might end up being inadvertently altered (onehalf).

paul d hunt's picture

BTW, using the ‘frac’ feature to access pre-composed fractions is a bad practice.
It’s true that it’s handy for the user, but by doing so the input character stream (one;slash;two) might end up being inadvertently altered (onehalf).

but if the user specifies that one slash two be replaced by onehalf via the frac feature, don't we want to preserve the end result as opposed to the initial character stream?

Thomas Phinney's picture

That's an interesting question. I guess it depends on whether you view the original text stream as merely an input method, or as something to be preserved.

Cheers,

T

twardoch's picture

BTW, FontLab 4.5 is really old. I recommend using FontLab Studio 5.0.2 to build OpenType fonts.

Syndicate content Syndicate content