Skip to content(if available)orjump to list(if available)

Kerning, the Hard Way

Kerning, the Hard Way

70 comments

·March 14, 2025

seumars

Funnily enough the example given of good “L” and “T” kerning in the word SALTY is badly kerned, the letters are kerned too close to each other. The classic trick is to look at 3-letter groups at a time, one word at a time.

Hackbraten

It’s a deliberate design decision because of the stripes:

> The pattern of vertical stripes means that kerns can only be a multiple of the stripe repeat (not quite true, and i have sketched out more general versions of this, but it is true for this font).

gundmc

I thought so too, but now if I look it seems as if every letter is just under two stripes with from its neighbor?

eviks

This doesn't help much since visual perception doesn't depend just on this distance

beezlewax

It's more of an artform than a science as I think different people perceive this differently

hinkley

And the HN font on Safari puts the TY too close together IMO.

Look at them touching. Gross.

russellbeattie

I can't help but point out that as someone who went to college for journalism and graphic design in the early 90s, and had to lay out galleys using strips of words and a razor blade, let me assure this isn't the hard way. Correcting a missing apostrophe or manually adding a hyphen while not throwing off an entire line requires both an eye for kerning and a steady hand.

Get off my lawn.

stavros

Oh yeah? You youngsters have it easy, you don't know what it means to have to throw away the whole tablet and start again when your chisel slips.

The Pharaoh was not amused, I'll tell you that much.

Someone

Impostor! Clay tablets where written in wet clay, so you didn’t use a chisel and didn’t have to throw away the tablet when your stylus slipped. At worst, you’d erase the entire tablet, but you likely could erase a small part often tablet.

Many tablets even could be recycled after the pharaoh read them (could pharaohs even read?). https://en.wikipedia.org/wiki/Clay_tablet: “Cuneiform characters were imprinted on a wet clay tablet with a stylus often made of reed (reed pen). Once written upon, many tablets were dried in the sun or air, remaining fragile. Later, these unfired clay tablets could be soaked in water and recycled into new clean tablets. Other tablets, once written, were either deliberately fired in hot kilns, or inadvertently fired when buildings were burnt down by accident or during conflict, making them hard and durable”

hinkley

But I thought a lot of the tablets we have were from trash piles and they seem to have typos. So who is the impostor here?

<grabs the top of your head>

Old Man Withers!?

nick3443

Try having your finger slip and smudge a buffalo drawing. You have to find a whole new cave to draw in!

crazygringo

This is just masochistic.

Why would you even try to encode a striped background into a font? And then make kerning work? I don't even know what to say. "The hard way" indeed...

Backgrounds are backgrounds, fonts are fonts, and never the twain should meet...

skrebbel

> Why

For fun

jedberg

I literally read this headline as "keming the hard way" and thought it was the most clever title ever.

AceJohnny2

jedberg

Oh I know. I’ve been thinking about keming for 30+ years. :)

stavros

OK then I'm going to need an explanation of what was clever about it. It seems like it would just be reusing the meme, no?

AceJohnny2

lol ooops, missed who I was talking to ;)

badlibrarian

The complexity comes from needlessly combining two separate things into one: a simple repeating background pattern and a typeface. It's a "serving suggestion" when really all that's needed is the corn flakes.

kevincox

Yes, but if you are really picky you will want your background pattern to align nicely with your typeface. Sure, you can carefully try to ensure that each character is a multiple of some fixed unit and set your stripe size based on that. Then make sure that the start padding is correct. But every step of the way any differences in the text renderer and things like accessibility settings overriding font sizes will be working against you. If you want to use this on a website or any other medium that doesn't have a very strict and consistent rendering pipeline I can't think of a better way to do it than a font like this.

badlibrarian

Highly stylized letters over a background traditionally utilize .png or .jpg technology. Not that this guy's attempt at writing a wingdings++ compiler isn't amusing.

hinkley

Yeah this is something you do for a logo. And I believe today you’d probably see this done as SVG. Though whether you would build the font out of lines or use an existing font one letter at a time is probably an open question.

rasz

Kerning, the super easy way straight from 1986 Atari ST: https://en.wikipedia.org/wiki/Calamus_(DTP)#Calamus_Intellig...

jasonthorsness

Ha the font looks great; but this seems to be pushing the boundaries what fonts themselves were designed to support, definitely "hard mode". What is the intended use case?

LegionMammal978

Classically, you'd do things like replace f+i with an fi glyph, or f+f+i into an ffi. Though I'm surprised that it can be used to split one glyph into multiple glyphs, then transform those glyphs again.

null

[deleted]

euroderf

I've had the same idea for Finnish, where all-uppercase text has some really ghastly kerning issues, like YT and VY and KY and (gack!) LJ. I hope to see a font RSN.

layer8

Isn’t kerning something that would be amenable to be approximately solved by machine learning? I.e. for a “good enough” default kerning? (Ignoring the extra difficulty from the stripes in TFA.)

shove

Since it’s an issue of equalizing the perceptual area in the negative space, there’s not really any reason to throw ML at it. Throw actual math at it.

orbital-decay

Human perception is highly non-linear and largely based on the concepts stored in the brain. Trying to manually approximate that with math is bound to fail once you approach certain fidelity threshold. If you look at the recent color science and spatial perception research, it becomes obvious that it makes total sense to mass profile the perception and throw ML at it. A lot of researchers are still in denial about this, though.

raphlinus

Agree with sibling comments. There's something very slippery and tricky going on with "perceptual area," it's not simple geometry. This is actually an area where I think machine learning has something to offer.

scyzoryk_xyz

Mrs. Scyzoryk is a typographer, confirms that it’s not just math, but can’t imagine using ML for what is an integral part of developing an „eye” and going through the process.

f30e3dfed1c9

There have been lots of attempts to automate kerning for decades. Most people seem to agree that they're still inadequate and that manual adjustments produce the best results.

oniony

Would it have been possible to fix this by instead swapping out the LT pair with a ligature?

dzaima

The GSUB lookups used are indeed the same thing that's used for ligatures.

null

[deleted]

shove

I could have sworn that was where this was going in the first place

throwawayk7h

Fonts should probably not do this. This would be better served as the font being what's in negative, and then the backdrop behind it being an unrelated graphical element, perhaps accomplished with css.

whatnow37373

I don’t see how the benefits of kerning, if any, outweigh the enormous costs.

Muromec

It looks nice. When everyrhing consistently looks nice, thise small things accumulate into one apple.

exe34

it's one of many little things that add up to "oh your poster looks much nicer than the others" - but they can't put their finger on what exactly makes it nice.

keming

Kerning lets letters be spaced more uniformly, which is easier to read for most of us.

It also allows letters to crowd each other like friends in a wacky group photo, a tree overhanging a sidewalk, or a cat's tail doing its weird contortions. Fonts are fun.

It’s worth the trouble I think, but there are options if you’d rather not support it.

dsp_person

In my e-reader I changed the font to Roboto Mono and completely forgot it was monospace. It's not like reading feels any less efficient. Idk might even feel more efficient or comfy somehow.

MrMcCall

Maybe there's an advantage to having each successive character appear perfectly rhythmically across the page.

What I want are two or even three shades for consecutive lines, to make it easier to transition from the end of the current line to the beginning of the next.

dsp_person

Hmm can you explain? Would that be like line 1 starts out purple, transitions to light purple at the end of the line, and 2nd line starts light purple, transitions to pink, 3rd line starts pink and transitions to purple?

f30e3dfed1c9

The costs aren't enormous or anything close to it.

numpad0

sales