[Fontinst] A classic: SC & OSF sets

Lars Hellström Lars.Hellstrom@math.umu.se
Sat, 11 Jan 2003 18:45:21 +0100


At 20.00 +0100 2003-01-10, Philipp Lehman wrote:
>I didn't install any new fonts for quite some time and it seems like
>my command of fontinst got a little rusty. While I'm trying to write
>a fontinst tutorial, thinks that used to be clear are not so clear
>any more when taking a closer look.
>
>Here's a 'classic' problem: suppose I'm writing a fontinst driver for
>Adobe Sabon, basic plus SC & OSF package. One peculiarity of Adobe's
>SC & OSF sets is that they omit upright OSF fonts for the regular
>weight and put the OSFs in the SC font. This requires exchanging/
>renaming glyphs in three cases:
>
>1) Creating an upright VF with OSFs (e.g. T1/psbj/m/n)
>2) Creating a SC VF with lining figures (e.g. T1/psb/m/sc)
>3) Creating an upright, TS1 VFs featuring OSFs (e.g. TS1/psb/m/n)
>
>1) When looking at some old drivers of mine and searching the archives
>of this list, it seems to be common to do that as follows:
>
>\installfont{psbrj8t}{psbr8r,unsetnum,kernoff,psbrc8r,kernon,latin}{t1}%
>  {T1}{psbj}{m}{n}{}
>
>What is puzzling me is toggling \setkern with kernon.etx and
>kernoff.etx. A couple of questions:
>
>* \setkern does not overwrite existing kerning data, right? Do we need
>to disable \setkern at all in this case? After all, both psbr8r and
>psbrc8r feature the same glyph set.

\setkern _appends_ to existing kerning data. If there is a kern between two
glyphs in psbr8r, then a \setkern in psbrc8r would not affect that, but if
there was no such kern, then the kern from psbrc8r will be used. This could
be to avoid e.g. that a \setkern{a}{v} (that is, a kern between an Asmall
and a Vsmall) in psbrc8r gets applied to the a and v of psbr8r.

>* If we do, what about the kerning of the OSFs in psbrc8r? In this
>case, their kerning data is lost, isn't it?.

Correct.

>What's more,
>unsetnum.mtx doesn't seem to remove the kerning data of the lining
>figures; it just clears the glyphs. So wouldn't we get OSFs kerned
>like lining figures here?

Yes we will, although I think the number of fonts in which lining figures
have kerning is rather small.

>2) That might be done like this:
>
>\installfont{psbrc8t}{psbrc8r,unsetnum,kernoff,psbr8r,kernon,latin}{t1}%
>  {T1}{psb}{m}{sc}{}
>
>The same questions apply...

Quite true.

>3) is an interesting case as well:
>
>\installfont{psbr8c}{psbr8r,unsetnum,kernoff,psbrc8r,kernon,resetosf,textcomp}{
>ts1}%
>  {TS1}{psb}{m}{n}{}
>
>* Same questions as above...
>* What about resetosf.mtx with respect to kernon.mtx? Should \setkern
>be reactivated before or after resetosf.mtx is read?

Doesn't matter. \setleftrightkerning is not based on \setkern, hence
whether the latter is turned off has no effect on the former.

Getting everything right with SC&OsF fonts is usually a job for \reglyphfont.

Lars Hellström