[Fontinst] Kerning

Walter Schmidt w-a-schmidt at arcor.de
Mon Aug 25 16:10:22 CEST 2003


On Mon, 25 Aug 2003 14:21:31 +0200, Ulrich Dirr wrote:

>Easiest would be to have some kind of table like below
>
>%left char(s) right char(s) value
>T [a aacute atilde aring ...] -80
>T [adieresis agrave acaron acircumflex ...] -30
>-- yielding --> 
>T a -80, T aacute -80, T atilde -80, T aring -80, ...
>T adieresis -30, T agrave -30, T acaron -30, T acircumflex -30, ...

(1)
Choose a "model glyph" for each class, say "a" and "adieresis"

(2)
Put the following commands for the "model glpyphs" in an 
mtx file, which is specific for the particular font, and
read this additional file in the course of \installfont:

  \setkern{T}{a}{-80}
  \setkern{T}{adieresis}{-30}
  \setkern{V}{a}{...}
  \setkern{V}{adieresis}{...}
  ...

(3)
Write a "general" mtx file, which defines the kerning of
the remaining glpyhs according to the "model glyphs", and
input this file in the course of \installfont, too:

  \setleftkerning{aacute}{a}{1000}
  \setleftkerning{atilde}{a}{1000}
  ...
  \setleftkerning{agrave}{adieresis}{1000}
  \setleftkerning{acaron}{adieresis}{1000}
  \setleftkerning{acircumflex}{adieresis}{1000}
  ...

The latter file needs to be written only once and can be 
used for arbitrary fonts then, provided that the kerning 
of the "model glyphs" is already defined.

BTW, latin.mtx includes a number of \setleftrightkern
commands for similar (but very trivial) cases.


HTH
Walter



More information about the fontinst mailing list