calculating kerning pairs

14 views
Skip to first unread message

Tavis Ormandy

unread,
Aug 6, 2022, 7:49:44 PM8/6/22
to
Hello, I naively assumed that when I did setfont (foo) show that the
kerning pairs in the font tables would influence spacing.

I understand now that it does not. You're supposed to use kshow and
apply the character spacing yourself.

Fair enough, but then how do I get the "base" kerning for a character
pair from within postscript, or do you have to parse the afm files
manually?

I understand that I can specify any kerning I want and that's a good
thing, but wouldn't you usually want that to be a multiplier applied to
the font's "base" kerning pairs?

Tavis.

--
_o) $ lynx lock.cmpxchg8b.com
/\\ _o) _o) $ finger tav...@sdf.org
_\_V _( ) _( ) @taviso

ken

unread,
Aug 8, 2022, 3:00:51 AM8/8/22
to
In article <jl8d0l...@mid.individual.net>, tav...@gmail.com says...

> Hello, I naively assumed that when I did setfont (foo) show that the
> kerning pairs in the font tables would influence spacing.

PostScript type 1 fonts don't have kerning information in the font.


> I understand now that it does not. You're supposed to use kshow and
> apply the character spacing yourself.
>
> Fair enough, but then how do I get the "base" kerning for a character
> pair from within postscript, or do you have to parse the afm files
> manually?

You have to parse the AFM files (or kern tables in a TrueType font)
manually.


> I understand that I can specify any kerning I want and that's a good
> thing, but wouldn't you usually want that to be a multiplier applied to
> the font's "base" kerning pairs?

I can't pretend to know the reasoning behind the original design, but I
would suggest that kerning is regarded as being like all other spacing
control (widow/orphan/rivers etc) to be managed by the layout
application.

Reply all
Reply to author
Forward
0 new messages