Kerning classes and font generation
Fred Wilson
Posts: 16
Hello, and happy holidays to everyone,
I have kind of a noob question, but hey, you gotta learn, right?
So I'm using Fontlab 5. I open the "New Metrics Window", I type my pairs (let's say "LT"), adjust the kerning manually. Then I create my kerning classes with the diacritics. Then I generate the "kern" feature in the OpenType panel. Then I compile it. Whenever I generate the font file (File > Generate Font), my kerning is completely f*cked up. When I open the .ttf file, I can see some classes have disappeared (only one among the two I've created remains in this particular example) and some kerning pairs have disappeared too. The "kern" feature isn't the same anymore and its whole code has changed.
Now I think I could expand kerning to create a flat kerning table to avoid that, but I was wondering why is this happening. Am I doing something wrong, or is it some sort of settings to adjust in order to keep the features/classes as they are when the font file is generated? I'm wondering because since I saw this issue, I saw it in every font I have created in the past (pairs disappearing, classes being renamed too, "kern" feature being edited).
Thank you for taking the time to read my question, and thank you for your help!
I have kind of a noob question, but hey, you gotta learn, right?
So I'm using Fontlab 5. I open the "New Metrics Window", I type my pairs (let's say "LT"), adjust the kerning manually. Then I create my kerning classes with the diacritics. Then I generate the "kern" feature in the OpenType panel. Then I compile it. Whenever I generate the font file (File > Generate Font), my kerning is completely f*cked up. When I open the .ttf file, I can see some classes have disappeared (only one among the two I've created remains in this particular example) and some kerning pairs have disappeared too. The "kern" feature isn't the same anymore and its whole code has changed.
Now I think I could expand kerning to create a flat kerning table to avoid that, but I was wondering why is this happening. Am I doing something wrong, or is it some sort of settings to adjust in order to keep the features/classes as they are when the font file is generated? I'm wondering because since I saw this issue, I saw it in every font I have created in the past (pairs disappearing, classes being renamed too, "kern" feature being edited).
Thank you for taking the time to read my question, and thank you for your help!
Tagged:
0
Comments
-
The user and all related content has been deleted.0
-
Be aware that when you open a generated font kerning tables are decompiled and some pairs may be lost in the new FL file. However, this does not mean they are not present in the actual font. The best way to check the kerning pairs in a font is to open it with a tool like DTL OTMaster.1
-
Thank you both for your answers!
James, no I wasn't, is that bad? When should I do this in my process? I have done as you said though, but didn't notice any change.
Ramiro, so technically, when I open (in Fontlab) the .ttf file I have generated, it is "normal" that I don't see the same classes and kerning pairs as I had before? I wasn't familiar with DTL OTMaster but I have installed the free light version. The information needed is in "Tools > GPOS/GSUB Table Viewer", isn't it? If that's the case (and if I understood well what I saw) then it seems like the kerning pairs are all present indeed. Isn't it strange that Fontlab doesn't display this kind of information properly?0 -
>>Isn't it strange that Fontlab doesn't display this kind of information properly?
No it's isn't because FL needs to interpret the binary file and it's not a perfect process.
Cheers.0 -
I see. So I shouldn't really worry about it, if I understand correctly1
-
Try inserting subtable statements; there is a limit to how many pairs can fit into a table.
0 -
Be careful randomly inserting subtable statements. It’s not as simple as just periodically breaking things up. You could likely end up breaking some of your kerning as well.
1 -
Best way IMHO: use Karsten Luecke's 'Make Kern Feature' script.0
-
Michael, I have no idea what a subtable statement is, but I will look into it.
I think I will stay with the idea of creating a flat kerning table right before generating my font file.
Thank you all again for your help!0 -
I think I will stay with the idea of creating a flat kerning table right before generating my font file.
Not recommended. Unless you have a very basic font with minimal kerning, that could quickly lead to an uncompilable font. But if it compiles for you, then fine, I suppose. Sorta defeats one of the main purposes of class kerning.
0 -
Kent, correct me if I'm wrong, but isn't the whole purpose of kerning classes to save you some time when you actually kern your font? I mean, if I expand kerning and create a flat kerning table after I did my kerning with my classes and master glyphs, how could that be a problem? It wouldn't change the way the font behaves when it is installed and used in software, right? Forgive the newbie question, I'm still learning0
-
It increases the file-size significantly, and having too many kern pairs can cause problems in some applications. Also, if your classes are correct, there is no reason they should be expanded.0
-
Jasper, thanks for the information. Do you have additional information on these potential problems that may occur in some applications? Like, which applications for example? Correct me if I'm wrong, but the problem you're talking about is the fact that kerning won't be displayed correctly, right? I believe there are also some applications that won't read kerning classes, right? So technically, there is no way to make it work perfectly everywhere, is there?0
-
but isn't the whole purpose of kerning classes to save you some time when you actually kern your font?
Only part of the purpose. The other part is to allow larger amounts of kerning data in a more efficient manner. Flattening can either lead to table overflow (which will prevent compilation) and/or truncated data (depending upon whether you’re talking about GPOS kern feature or legacy flat kern table).
But, like I said, if your font is simple enough, with modest enough kerning data, and it compiles after flattening, then fine.there are also some applications that won't read kerning classes,
Not sure there are any current apps that won’t read OpenType kerning. Maybe outside of the mainstream.
0 -
Kent Lew said:Not sure there are any current apps that won’t read OpenType kerning. Maybe outside of the mainstream.
tl;dr: Potentially TT for Office, backwards compatibility, and some libre software.
0 -
Thanks Kent, I have indeed compared my actual "work-in-progress font" file size with class based kerning and with a flat kerning table, and with the latter the file is almost 3 times bigger. Now of course, it's only 400 Ko versus 150 Ko, but still. Anyway, I'm getting this message when trying to compile my font with a flat kerning table: "GPOS feature 'kern' causes overflow of offset to a subtable"
So it is indeed too much, we're talking 40.000 pairs (alternates, diacritics, etc.). So class kerning it is for this one.
Nina, thanks for the information and link. I feel like the font creation process is still abstract to me. Using software is quite easy (well, at least for the standard/basic things to do). But when it comes to deeper things, well, I feel lost. I don't have all the vocabulary, so when I try to find information online, I feel like a 3-year-old trying to speak. I'm sure I'm not the only one feeling like this. Anyway, we went a long way from my original question, and it gives me a lot of stuff to think about. Thank you all once again for your help in this topic!1 -
Spend some few bucks and buy Karsten Luecke's 'Make Kern Feature' script to solve the kern overflow issue.0
-
The user and all related content has been deleted.1
-
James, thank you for the tip! However, no errors were found while clicking on the ying/yang button in "Kerning Assistance".
Ramiro, thank you for the idea, I will definitely give it a try. Another new thing to learn0 -
Fred, please first check carefully your kerning classes. If Left and Right classes are not well made and consistently called in the same way (eg. '_left' is not the same than '_Left'), the script won't work as intended.0
-
Fred Wilson said:...we're talking 40.000 pairs (alternates, diacritics, etc.). So class kerning it is for this one.
0 -
Karsten’s script is excellent — but only if you *really need it*. (Karsten says as much himself.)
It sounds like the only reason Fred seems to need it is when he flattens the class kerning, which is not really necessary for OpenType {kern} feature (and which is what Karsten’s script optimizes and subtables). I’m still not clear why Fred thinks it needs to be flattened.
If one is going to include a legacy, flat <kern> table (and Nina’s right, there are reasons/occasions to do so), then you’re probably better off thresholding or otherwise paring the data down to the most valuable/likely pairs.
1 -
Possibly a dumb question... Did you work out your basic spacing (by adjusting sidebearings) before doing kerning? 40k is a lot of pairs, especially for a self-described "noob".2
-
The user and all related content has been deleted.4
-
Sometimes you make "Accidental" exceptions to class kerning, thus increasing the number of kerns needlessly. Check for "red flagged" kerns in your metrics table view and see if you have many.1 -
Wow now this is a lot of answers
Ramiro, thanks for the advice. I'm very careful with this kind of things, but of course you can't exclude the usual typo. In this case however, it doesn't seem to be a problem in the name of the classes.
Georges, the 40.000 pairs were the result of the flat kerning table. I'm trying to use kerning classes as wisely as possible, and so far there are only 291 kerning pairs when the kerning table isn't flattened. The font includes Latin and Cyrillic, diacritics for both, and about 350 alternates. I now realize it wasn't clearly stated in my previous message, sorry for the confusion.
Kent, that was actually the original question in my topic. I was confused by the fact that I didn't see all the classes and pairs when I opened back the generated .ttf file in Fontlab, but now it has become quite clear that I didn't need to pay attention to this.
Mark, thanks for the advice! I did that, I was very careful with spacing before doing any kerning. I might have been a little bit wrong by describing myself as a complete noob, and this is absolutely my fault. To be honest, I have been playing with fonts for four years now, but I still see myself as a beginner. Like I said, I think I have the basics: drawing glyphs, making things look as good as possible, metrics, spacing, kerning, things like that. However, the font creation world is still very obscure to me, and I sometimes don't understand the consequences of what I'm doing (like this "noob" question about classes and pairs not being displayed correctly in Fontlab). I'm pretty sure I'm not the first person to feel like this, and I won't be the last one either. And I sometimes prefer to keep it "modest" when it comes to my knowledge since I don't understand everything (and English isn't my first language either, which doesn't help for technical words). As I wrote in another answer earlier, the 40.000 pairs were the result of the flat kerning table. The regular kerning with the classes only has 291 pairs. I'm sorry for the misunderstanding, it wasn't clearly written in my previous message, my fault again.
James, you are absolutely right, I'm also always trying to optimize this as much as possible.
Chris, you are also absolutely right, I had a dozen of these accidental exceptions a few weeks ago but as soon as I saw them, I made the necessary corrections
0 -
Maybe reduce the amount of flat kerns you're generating. I typically have less than 300 pairs and I expand flat kerning to 2500 pairs. It ensures that basic kerning classes will work in low-end applications: comma, period, quotes, most of the common Latin accents. In Fontlab options/kerning, you can set it automatically generate whatever you like.0
-
Ray, so you mean I could keep some classes and expand the rest so there are still some kerning classes but the kerning is still expanded (with less pairs then)?
I also forgot to say, the font is uppercase only (the lowercase is just a variation of the uppercase). And then, there are the alternates. So for example, I have 10 different "A", 2 basic ones, 8 alternates, in 3 different kerning classes depending on the shape. And then there are the diacritics. The same goes for the "E". When I look at the flat kerning table, it's 95% diacritics and alternates.
On a side note, I'm very happy to see that I know the name of many people in this thread. Thank you for sharing your knowledge like this and for your awesome work over the years!1 -
Fred, if you used anchors for the diacritics I cannot think of any situation where you would need to kern any of them.
0 -
Georges, thank you for the advice, I didn't know about anchors. Now that I have read the Fontlab manual, I can see it is useful to build composites among other things. However, I didn't manage to find out how this would affect the kerning? Here's what I'm usually doing: I create the "acute", create the "A", and then double-click on the "Aacute" (which wasn't created) so it creates the glyph.0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 798 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports