Classes Issue

msmiths's picture

Im working in Fontlab 5 and as a test setup a simple Kerning Class

_G: G' g

In the Metrics Window with Kerning Mode on I have three of the same words


In the first all caps ANALOG above I kern the 'G' at -10 and expect to see the lower case 'g's below move in accordance and nothing happens.

Why isnt this class working and affecting the lowercase g as it should?



msmiths's picture

What I'm trying to do is since the font uses the same glyphs for both upper and lowercase is to have any kerning that is done to all characters at the same time, all of these below included in one class

_A: A' Aacute Acircumflex Adieresis Agrave Aring Atilde

_a: a' agrave aacute acircumflex atilde adieresis aring

Can I combine the two and have it work so I dont have to seperately kern upper and lowercase since they are the same glyphs basically it is an uppercase only font.

msmiths's picture

Of course I would have another case for that would cover all 'A' characters the above is right and here is left:

_A_left: A' AE Aacute Acircumflex Adieresis Agrave Aring Atilde

_a_left: a' ae aacute acircumflex adieresis agrave aring atilde

charles ellertson's picture

Yes, you can combine them. The FontLab metrics window gives you the options of (flat) pairs kerning, class kerning, and class kerning with exceptions. You probably don't have one of the "class" options selected. There is a PDF manual that comes with the program. Read the kerning section.

msmiths's picture

I've sent a ticket into fontlab, I've tried everything, with class options selected, read the manual numerous times no matter what I cant get the most simplest classes to work and react in the preview window, my kerning actions only affect the main glyph and when I click the icon the submenu is greyed out when it should show the class and glyph associations…

charles ellertson's picture

To tell you a little secret, I too have trouble with FontLab. How I work is to write my features, then "save" them from the OT panel.

(Edit: actually, to be truthful, I don't even "write" the features in Fontlab, but with a text editor that allows a column mode. But the easiest way, the first time, is to write them in FontLab.)

I then open up that file with a text editor -- I use VEDIT, but EditPad Pro is likely a better, more modern choice. At the head of the features file, I write my classes, such as:

@_exclam=[exclam bracketright c d e g i j k l p r s t v w x y question quoteright quotedblright uni02BE uni02BF];
@_zerosuperior=[zerosuperior onesuperior twosuperior threesuperior foursuperior fivesuperior sixsuperior sevensuperior eightsuperior ninesuperior];

then, make a kern feature, e.g.,

feature kern {

and add the positioning commands, e.g.

pos @_exclam @_zerosuperior 50;
pos @_comma @_zerosuperior -50;


Some creativity with this technique is possible; you can do you kerning as pairs in FontLab, build a kern featrure in FontLab, export it, then (as above) define your classes in the feature file (NOT the classes file, that should have nothing in it with my technique), change your existing entries in the kern feature in accordance with the classes you write, and re-import the modified (new) features file.

i.e. in the file, you change

pos A C -36;


pos @_A2 @_C1 -36;

and since you have now written classes for @_A2 and @_C1, it should compile just fine.

Just remember that when FontLab alerts you that the kerning values are different from the kern values in the features, and asks if it should rebuild the kern feature, you say NO. Not only NO but HELL NO.

This is a tough way to go, but I've found it bullet proof when, as always happens, I have to go back into the font and change/add kerning. I save the .VFB, and try to never work from the .OTF. In point of fact, I keep the separate (importable) features file current as well.

Just remember that the kerning in the compiled feature file is what is used when you generate a font.

Good luck

Miguel Sousa's picture

> Why isnt this class working and affecting the lowercase g as it should?

To me it sounds like you haven't ticked the checkboxes on the Classes panel.

msmiths's picture

I figured it out thanks for the feedback!

Syndicate content Syndicate content