[Fontinst] Multiple Master Fonts and the Width Axis

Lars Hellström Lars.Hellstrom at residenset.net
Thu May 13 21:16:53 CEST 2010


Christopher Adams skrev:
> Hello all,
> 
> I am curious about the feasibility of installing Multiple Master Fonts with
> fontinst for use in pdfLaTeX, in particular to make variants available for
> font expansion by the microtype package.

I can't see that the fontinst side of this would be any problem at all 
(i.e., no new problems arise because you need to deal with extra 
widths). One might rather run into issues with the fontname scheme or 
NFSS (how to name all the fonts that you want to generate?), but you 
seem to have settled on solutions for those already.

> I have a firm grasp of the type tools used to generate custom instances
> (mmafm and mmpfb),

This is otherwise what I would consider the trickiest part (but OK, the 
instructions you quote look easy enough).

> and it appears straightforward to install MM instances
> using the traditional {series}{shape}{size} parameters supported by fontinst
> and font definition files.
> 
> What I don't see support for in fontinst is MM instances generated along the
> width axis for use in font expansion.

If you're using \installfont level commands, you simply need to write 
more of them (because you want to generate more fonts).

If you're using \latinfamily then you need to modify the list of widths 
  that this (rather dumb) command will look for. The key macro there is 
\latin_widths, whose default definition is

\def\latin_widths{
    \latin_width{}{}
    \latin_width{n}{c}
}

The first argument of \latin_width (no plural) is the fontname width, 
and the second argument is the "NFSS width" -- technically it will be 
the second half of the NFSS series attribute. A trivial redefinition to 
also do +5, +10, -5, and -10 width variants would be

\def\latin_widths{
    \latin_width{}{}
    \latin_width{+5}{+5}
    \latin_width{+10}{+10}
    \latin_width{-5}{-5}
    \latin_width{-10}{-10}
    \latin_width{n}{c}
    \latin_width{n+5}{c+5}
    \latin_width{n+10}{c+10}
    \latin_width{n-5}{c-5}
    \latin_width{n-10}{c-10}
}

> Following the example that Hàn Thế Thành gives in his Font Expansion with
> pdfTeX article, instances meant for use in font expansion have a +5, +10,
> etc. appended to the font name. Thus, Minion MM Roman at 12 points with 2
> percent expansion is named pmnr8a12+20.pfb.

If you care about sizes, then you need to work at the \installfont 
level, since \latinfamily only does "one font for all sizes" declarations.

> Can fontinst be used to install these MM instances for use in font
> expansion?

Yes, as shown above. The only thing I can think of that might be 
potentially problematic is that the above generates NFSS declarations 
for all the font widths: there's an m series, a b series, an m+5 
series, a b+5 series, an m+10 series, and so on. As long as one doesn't 
select any font from those extra series explicitly however, I don't 
think they do anything besides taking up a bit of main and string 
memory, which are usually not in short supply.

Lars Hellström




More information about the fontinst mailing list