letterspacing
Lars Hellström
Lars.Hellstrom@math.umu.se
Tue, 3 Mar 1998 12:34:23 +0100 (MET)
As a reply to Richard Walker, who wrote
>Hi all (it's been quiet here!).
>
>Back to (Monotype) Baskerville. I'm using small caps in my page
>headings, and they need a little letterspacing.
>
>I've tried the letterspace package but I fear it only works when you
>give it the text itself as an argument (the tokens get gobbled up too
>early otherwise), so I can't specify that all page headings should use
>it.
Actually, if you are using a true small caps face it should not need any
letterspacing (unless Monotype happens to have made a bad cut, in which
case they should be ashamed of themselves). If you are using a faked small
caps face then you should get a true one, faked small caps doesn't look
very good. But it's your choise...
>So . . . I recalled talk of generating a vpl file with letterspacing.
>Lo and behold, fontinst appears to support it.
fontinst is too keen on supporting it, in my view, but I'll get back to
that in an other mail.
>There are (in v1.504) a number of occurrences where the letterspacing
>parameter is set, e.g.
> \setint{letterspacing}{\int{capspacing}}
>and
> \setint{letterspacing}{\int{smallcapsspacing}}
>
>but the only place where it seems to be used is in fontinst.sty in the
>macro make_header where it occurs in this context:
>
> \setint{letterspacing}{0}
> \afm_convert\side_bearings=\div{\int{letterspacing}}{2};
>
>So I'm at a loss to see what effect the letterspacing parameter has.
>
>What do I do?!
You could have tried to seek for occurencies of \side_bearings. That would
have shown you the macro \do_character_sidebearings
\def\do_character_sidebearings{
\ifisint{\slot_name-spacing}\then
\afm_convert\curr_bearings=\int{\slot_name-spacing};
\divide\curr_bearings by 2
\else
\curr_bearings=\side_bearings
\fi
\afm_convert\a_dimen=\width\slot_name;
\advance\a_dimen by 2\curr_bearings
}
which is called by \do_character in the context
\afm_convert\a_dimen=\width\slot_name;
\do_character_sidebearings
\out_lline{(CHARWD~\vpl_real\a_dimen)}
That changes the width for TeX. Another macro of interest is
\def\do_character_map{
\global\prev_mapfont=0 \out_lline{(MAP}
\out_llline{(MOVERIGHT~\vpl_real\curr_bearings)}
\mapcommands\slot_name
\out_llline{(MOVERIGHT~\vpl_real\curr_bearings)}
\out_llline{)}
}
which inserts some space (\curr_bearings, as set above) at the sides of the
character in the VF file as well, so that the DVI driver positions the
character correctly.
Thus fontinst does indeed space your letters, if you want it to. But you
really shouldn't, IMHO.
/ Lars Hellström