Installing Malvern fonts

P. Damian Cugley

Oxford University Computing Laboratory Parks Road Oxford ox1 3qd UK

                                      Damian.Cugley@comlab.ox.ac.uk

(Where this document and the corresponding chapter in the Handbook differ, this version is probably the more up-to-date.)

1 About Malvern

Malvern is a font family designed and implemented in METAFONT. It is a sanserif font intended mainly for non-technical documents. It does not blend particularly well with the Computer Modern fonts. 1.1 Generic driver file Malvern is unusual amongst METAFONT families in that it is supplied with one generic driver file which could in theory be used instead of having one driver file for each size and style the family comes in.* The generic driver file (ma.mf) inspects the values of variables like designsize and weight and gives the ad-hoc parameters appropriate values, before reading the program files. On some UNIX systems a small program called mff can be used to generate fonts using this system. Otherwise other measures will have to be taken, described below. 1.2 Malvern encodings Malvern uses a nonstandard encoding – in fact a family of encodings, for example, Malvern A (latin alphabets) and Malvern G (Greek). To create fonts for use with LaTEX 2e and the NFSS 2 font selection macros, use Alan Jeffrey’s fontinst package. This generates the fd files and virtual fonts so that Malvern fonts may be used in the same way as other LaTEX 2e families. (The glyphs needed to make fonts with the Cork (T1) encoding are in Malvern A and Malvern B.) This has already been done to make a selection of styles available with both TEX Text and T1 encodings. 1.3 Malvern font names The Malvern fonts generated with METAFONT will have TEX names of the following form:

ma style enc size

where the style is a two-digit style code (described below), enc is one- or two-letter code identifying a Malvern encoding (such as ‘a’ or ‘az’), and size is the size in points (e.g., ‘12’ for 12 pt, ‘17p28’ for 17·28 pt). Thus ma55a12 (12-pt Malvern 55, encoding A), ma56g12 (12-pt Malvern 56, Greek encoding).

The two-letter style codes are based on Adrien Frutiger’s system, devised for the Univers family. The first digit specifies the weight, from 1 (ultra-light) to 9 (ultra-bold), with 5 meaning medium and 7 bold. The second digit gives the width: 5 or 6 is normal width, 7 or 8 is compressed, 3 or 4 is expanded. An odd number means an upright font, an even number italic. Thus Malvern 55 is roman, Malvern 56 is italic, Malvern 75 boldface, Malvern 68 is demibold compressed italic.

The METAFONT programs are also able to generate fonts named in Karl Berry’s system,† starting with ‘fmv’. The correspondance between Malvern’s style digits and

* The package includes a selection of driver files nevertheless. † Karl Berry, File Names for TEX Fonts, version 1·6 (file://ftp.cs.umb.edu/pub/

tex/fontname).

weight, variant and expansion letters is given in the tables below. The encoding used for these fonts is TEX text, so for example fmvr12 and ma55s12 are names for the same font. This is so that these fonts may be used in plain-TEX and LaTEX-2·09 documents without too much confusion. NFSS 2 systems (indeed, any that use non-TEX-text encodings) will use virtual fonts.

As of October 1994, however, the font names standard does not allow for combinations of more than two variants (where ‘variants’ includes encodings and slant) without breaking the eight-character limit required by stupid filesystems like MS-DOS and ISO 9960. As an extreme example, Malvern 58 with the caps-and-small-caps, oldstyle-numerals variation of the TEX Text encoding is fmvr9ci7tc12 (12 chars). The only temporary solution I can offer is to extend the naming scheme used for the ‘ma-’ fonts to include encoding codes for the virtual fonts needed for plain LaTEX, NFSS and NFSS 2 (e.g., ma58ab12). Therefore, the ability to create fmv- fonts is not being used at present.

2 Unpacking Malvern

The Malvern distribution includes METAFONT source files, some TEX files such as this documentation, and a few other miscellaneous files.

All files have names that should work with MS-DOS and ISO-9960 filesystems. 2.1 Source files (/source) On most TEX systems, METAFONT fonts end up with their source files stored in one directory. I suggest that Malvern instead be given its own file area. This avoids problems with different font families having files with the same name, and makes it easy to replace all the Malvern files in one go if you upgrade to a newer version of Malvern.

With a new-style directory tree,* the Malvern-1.2 directory may be placed in the ‘texmf/fonts/public’ directory, and the source directory and driver directories merged and renamed so that METAFONT can find them.

The files mff.rc and fmv.mff are input files for mff and may be ignored if you are not using mff to generate fonts. If the Malvern files are being mixed in with a bunch of others, rename mff.rc to ma.mff. 2.2 Driver files (/drivers) Fonts can be generated by including assignments on the METAFONT command line, but driver files are more convenient (unless you have mff). These are also used when assignments to the generic driver file’s parameters on the METAFONT command line is impossible, such as when using the standard MakeTeXPK script. A driver file is included for each tfm supplied. 2.3 TEX input files (/tex) These files belong in a system-wide TEX inputs area. The files ending -.fd are font family description files, used by NFSS 2.

On new-style directory trees, the best approach is probably to link or rename the

texmf/fonts/public/Malvern-1.2/tex directory to texmf/tex/Malvern-1.2.

2.4 Documentation files (/doc, /dvi) Files ending in ‘.tex’ are plain TEX documents, and will not work with LaTEX. Compiled (dvi) files are supplied to save the installer having to run TEX. Read this document, install.tex, first. The Greek text encoding is described in magrman.tex.

Please do not install any of the macro files used to typeset the documentation in the system-wide TEX inputs area. They are not supported, not necessarily generally useful, and very nonstandard. Earlier releases of Malvern gave the macro files generic enough names that they might clash with other macro files. They have been renamed

* At the time of writing, the TEX Directory Standard (TeDiouS) is still in discussion. This is my best guess based on a TEX system I recently installed. to start with ‘pdc’ in the hope that this will avoid clashes if they are accidentally installed. 2.5 Virtual font files (/vf) These virtual fonts are generated using Alan Jeffrey’s fontinst package, and are Malvern fonts with the Cork encoding (and some of the trickier TEX Text variations). With NFSS 2 they are used by specifying encoding ‘T1’ and family ‘fmv’.s

The virtual fonts may have the following encoding codes:

Encoding Code Description
OT1c aa TEX text with caps&small caps
OT1c9 ab  ditto, with old-style numerals
T1  ar  Cork
T19  as  Cork, with old style numerals
T1c  at  Cork, with caps&small caps
T1c9  au  Cork, with c&sc and o.s. numerals

For example, ma55ar12 has encoding T1. Note that replacing lower-case letters with small-capitals counts as a different encoding scheme rather than a ‘font shape’. 2.6 Font metric files (/tfm) A selection of precompiled font metric files, including those for virtual fonts in /vf and the actual fonts needed to use them, as well as fonts needed to print the documentation in /dvi.

3 Using mff to generate Malvern fonts

First, install mff and arrange that METAFONT fill be able to find the mf files. Then to create a Malvern font, for example 12-pt Malvern 55 (ma55a12), give the command:

                               mff ma55a12

To generate Malvern 55 and 56 at magsteps 0, half and 1, for 300-dpi and 1000-dpi printers, you would type:

            mff --magstep=0,h,1 --dpi=300,1000 ma55a10 ma56a10

If all goes well, the tfm and pk files generated will be installed in the correct directories automatically.

4 Generating Malvern fonts without mff

This section presumes you know how to install a normal METAFONT font.

Create a driver file for each style of Malvern you want to be able to use. It should have the following form:

% ⟨name of file⟩ -- generate ⟨size⟩-pt Malvern ⟨style⟩

            font_size ⟨size⟩ pt#;
            encoding = ⟨number⟩;
            weight = ⟨number⟩; hratio = ⟨number⟩;
            slant = ⟨number⟩; italicness = ⟨number⟩;
            input ma
            bye

where ⟨size⟩ is the design size desired in points, and the values for the various variables are given below. The ⟨style⟩ is the two-digit style code described in § 1·3. To generate ’fmv-’ fonts, the second-last line is changed to ‘input fmv’.

These driver files should be named after the font they correspond to – for example, ‘ma76a12.mf’ to generate Malvern 76. Then they are used as usual with METAFONT:

                   mf \mode=luxo; mag=m; input ma55a12

where m is the magnification wanted, or ‘1.0’ for no magnification. 4.1 Values for encoding The variable encoding specifies the encoding to use – in other words, the subset of Malvern’s glyphs to be generated. It should be given one of the following values:

Encoding  Code Description
encoding = 1 a  Malvern A (latin alphabets a–z, numerals, etc.)
encoding = 2 b  Malvern B (superscripts, symbols etc.)
encoding = 3 c  Malvern C (Cyrillic)
encoding = 5 e  Malvern E (composite letters à–ž)
encoding = 7 g  Malvern G (Greek letters α–ω, ά–ω̃)
encoding = 19 s  TEX text (the same as CM Roman)
encoding = 26 az  TEX text, old-style numerals

The code is the used in the font name – for example, ma55s10 for Malvern with the TEX text encoding (encoding = 19), and so on.

The Malvern programs used to attempt to generate other encoding schemes; with fontinst this all becomes redundant and those codes are obsolete. 4.2 Values for weight The variable weight specifies the weight (boldness) of the font. It has the following values:

Weight  Style NFSS 2 Berry Description
digit code  code
weight = 1/4 1     ul      t  ultra-light
weight = 1/2 2     el      i  extra-light
weight = 3/4 3      l      l  light
weight = 7/8 4     sl      b  semi-light
weight = 1 5      m      m  medium
weight = 1·3 6     sb      d  semi-bold
weight = 1·6 7      b      b  bold
weight = 2 8     eb      x  extra-bold
weight = 3 9     ub      u  ultra-bold

The ‘style digit’ is the first digit in the two-digit style codes described in § 1·3. The ‘NFSS 2 code’ is the first half of a corresponding NFSS 2 ‘font series’ code. The ‘Berry code’ is the code for this weight in Karl Berry’s font naming scheme.

Note that some of the character programs produce ugly results for large values of weight. 4.3 Values for hratio The variable hratio specifies the ratio between horizontal and vertical measurements: in other words, whether the font is compressed or expanded. It may have the following values:

Hratio  Style NFSS 2 Berry Description
digit code  code
hratio = 0·50 9 or 0  ec      o  extra compressed
hratio = 0·80 7 or 8   c      c  compressed
hratio = 1·00 5 or 6   m      r  normal width
hratio = 1·15 3 or 4   x      x  expanded
hratio = 1·30 1 or 2  ex      w  extra expanded

The ’style digit’ is the second half of the two-digit style codes described in § 1·3. The ‘NFSS 2 code’ is the second half of an NFSS 2 ‘font series’ code (for example, bold expanded is b + x = bx, compressed is m + c = c). The ‘Berry code’ is for Karl Berry’s scheme.

Beware that the character programs do not all produce good results when hratio is not 1. 4.4 Values for slant and italicness These two variables between them specify whether a font is to be produced with italic letterforms or not:

Slant  Italic?  Style NFSS 2 Berry Description
digit code  code
slant = 0 italicness = 0 odd n       r  upright
slant = 1/8 italicness = 1 even ti or i  i  italic
slant = 0 italicness = 1 –  ui      u  ‘upright italic’
slant = 1/8 italicness = 0 –  sl      o  oblique

The ‘NFSS 2 code’ is the ‘font shape’ code. For italic this might be ‘ti’ or ‘i’ depending on whom you ask. The ‘Berry codes’ are variant letters for Karl Berry’s font naming scheme.

The variable slant is common to many METAFONT programs, and causes the glyphs to be obliqued. The italicness variable signals that italic letterforms should be used for some letters. It is possible to generate an obliqued font or an ‘upright italic’ with appropriate settings, but these cannot have ‘ma-’ names because I have not defined style codes for them.

5 Note on the Handbook

The Malvern Handbook, doc/maman.tex produces cross-references automatically via an aux file, and will need to be run through TEX twice to get the cross-references right. The front matter (preface and table of contents) are printed last, and should be transferred to the front of the handbook before binding.

pdc 1994.10.07