Quantcast
Channel: TypeDrawers
Viewing all articles
Browse latest Browse all 4153

Kerning glyphs with negative sidebearings in initial/final position

$
0
0
So is that even a thing? I felt like it would make sense when I was testing my font using the famous Pablo Impallari's template:
The solution is pretty straightforward, but requires us to keep the list of all glyphs in the font within a class (here any):
feature kern {
    lookup kerning1 {
        ignore pos @any [ f f.swsh j p y ]';
        pos f' <60 0 60 0> ;
        pos f.swsh' <510 0 510 0> ;
        pos j' <235 0 235 0>;
        pos p' <20 0 20 0>;
        pos y' <25 0 25 0>;
    } kerning1;
    lookup kerning2 {
        ignore pos [ f f.swsh ]' @any;
        pos f' <0 0 60 0> ;
        pos f.swsh' <0 0 190 0> ;
    } kerning2;
} kern;
This will increase the left sidebearing at the beginning of the glyph run and the right sidebearing at the end.

Is this approach at all practical or useful, have you ever implemented this or something similar? Is there an easy way to do this in any of the apps/tools you use? Now that I come to think of it, you could just write a script checking the sidebearings in all glyphs and applying appropriate kerning.

One way of thinking is that resolving such issues is responsibility of the layout engine or the typesetter. But obviously most people are not even aware this could be an issue:

Fixing a bug like above wouldn't be really obvious, I think at least some (if not most) design environments just take the advance width of the text as equivalent of the bounding box.

From my experiments, MS Word uses advance width to center text. So text with applied kerning of this kind would be centered more precisely, if that is what you'd want. (Besides, I often find myself centering text in InDesign manually because the unique shapes of sidebearings (even positive) make for an illusion of misalignment... but that's another pair of shoes).

Viewing all articles
Browse latest Browse all 4153

Trending Articles