This document is in the public domain and may be used freely.

Filenames for TeX fonts
***********************

This is the Fontname document, a naming scheme for (the base part of) external TeX font filenames.  Last update 5 July 2009.

Introduction
************

This is Fontname, a naming scheme for (the base part of) external TeX font filenames.  This makes at most eight-character names from (almost) arbitrarily complex font names, thus helping portability of TeX documents.  We point out some shortcomings of the scheme, and ways of dealing with them.

Please send additions, corrections, or other comments to tex-fonts@tug.org.  Email tex-fonts-request@tug.org to join the list.

Besides this document, the Fontname distribution includes various encoding files, mapping files, and utilities.  See the file README for details.  You can retrieve the most up-to-date version of these lists from http://tug.org/fontname.  It is also mirrored on all CTAN hosts in the directory tex-archive/doc/fontname.  For a list of CTAN mirrors, see http://www.ctan.org/tex-archive/CTAN.sites.

This document is in the public domain and may be used freely.

History
=======

The original inspiration for Fontname was Frank Mittelbach and Rainer Schoepf's article in TUGboat 11(2) (June 1990), which led to my article in TUGboat 11(4) (November 1990), pages 512--519. Mittelbach wrote another article criticizing the scheme below in TUGboat 13(1) (April 1992), pages 51--53; most of his points are well-taken, but I saw no alternative then, and see no alternative now. Others of his points are addressed in the appropriate sections below.

In August 1995, Fontname version 2 was released, concomitantly with a new release of the PostScript fonts for use with LaTeX and Dvips. After several years of experience, several modifications of the original distribution seemed desirable: more precise specification of encodings (see Variants); machine-readable mapping files (the *.map files in the distribution) and standardizing directory names as well as font filenames (included in supplier.map and typeface.map).

In Fontname version 1, some encoding variant characters (0, 2, etc.) have been reassigned to a 7 or 8 sequence (see Variants).  Although this is an incompatible change, the advantages of (1) consistency in naming encoding variants, and (2) having some free variants makes it worthwhile.  Also, not so coincidentally, new metrics for PostScript fonts in the Cork encoding were issued---same encoding, different metrics. So a new name served a practical purpose as well.

Many people have contributed to this work.  In particular, I gratefully acknowledge Nelson Beebe, Barbara Beeton, Rocky Bernstein, Thierry Bouche, Damian Cugley, Berthold K.P. Horn, Alan Jeffrey, Russell Lang, Pierre MacKay, Sebastian Rahtz, Jean Rivlin, and Tom Rokicki.

References
==========

Related files and distributions:

  * The TeX Directory Structure (TDS) standard, available at (http://tug.org/tds and CTAN:/tds) specifies a directory tree for all TeX library files.  The directory names given in Suppliers and Typefaces are intended to mesh with that standard.

  * The modes.mf file (ftp://tug.org/tex/modes.mf) contains recommended mode names to use as directory names.

  * The Fontinst distribution (http://tug.org/applications/fontinst supports quite general creation of virtual fonts, named according to the scheme given here.

  * The Dvips translator (http://tug.org/dvips) supports resident and downloadable PostScript fonts.  Dvips was the first place where Fontname became widely known.  Dvips also includes Afm2tfm, another program that can create virtual fonts.

  * The Dviljk processor (included in TeX Live) contains TeX support for the fonts built into the LaserJet 4.

  * `Designing New Typefaces with Metafont', by Richard Southall, Stanford Computer Science Department Technical Report STAN-CS-85-1074, September 1985, for a comprehensive terminology of font design.

Filenames for fonts
*******************

In this scheme, names may consist of only the letters (monocase a-z), numerals (0-9), and underscore.  Having two names which differ only in case is undesirable, since it results in clashes on common Windows filesystems.

Here is the basic scheme (the spaces here are merely for readability):

      S TT W [V...] [N] [E] [DD]

where

S
     represents the supplier of the font.

TT
     represents the typeface name.

W
     represents the weight.

V...
     represents the variant(s), and is omitted if both it and the width are normal.  Many fonts have more than one variant.

N
     represents the encoding, and is omitted if the encoding is nonstandard. Encodings are subsumed in the section on variants (see Variants).

E
     represents the width (``expansion''), and is omitted if it is normal.

DD
     represents the design size (in decimal), and is omitted if the font is linearly scaled.  Mittelbach in TUGboat 13(1) proposes using hexadecimal or base-36 notation.  In my opinion, the increased range does not make up for the unreadability of the common sizes (e.g., 10pt fonts would have a suffix a (in hex), or j (in base 36)).

We used to try to limit font names to eight characters.  This was never completely possible, and since DOS filesystems have become rare, it's no longer an issue.

The weight, variants, and width are probably all best taken from the original name of the font, instead of trying to relate them to some external standard.

Suppliers
=========

The supplier is the source of a font, typically a (digital) type foundry.

You should use the supplier letter which matches the supplier you obtained the font from, not the original source; for example, Avant Garde was designed by Herb Lubalin for ITC, but Adobe also sells it. The name of the font that you get from Adobe should start with p. This is because font resellers typically make modifications to the original design.

Notes on specific suppliers:

f
     For fonts that are distributed without any specific attribution to the creator, by individuals, or by small foundries.  (Unfortunately, we don't have enough characters to assign one to every font supplier in the world.)

r
     obsolete; specifies raw fonts, in the old distribution of Dvips.  New fonts should never use r. (The right thing to do is specify the correct encoding, variant, or whatever the font's characteristics actually are.)

z
     for fonts that just don't fit well into the naming scheme.  The z should be followed by the real supplier letter.

Here is the table from the file supplier.map.  It is organized alphabetically by abbreviation.  Each line consists of an abbreviation, directory name, and comment.

          [file supplier.map not included]

Typefaces
=========

For our purposes, a typeface is a collection of related fonts.

We sometimes use the same typeface abbreviation for fonts with different supplier names, where we know (usually by inspection) that the fonts truly are the same.  This helps conserve abbreviations.

Notes on specific typefaces:

ad
gm
     To explain a common confusion: ad is Adobe Garamond (with a FontName of AGaramond). This is quite different from the Garamond typeface distributed by Adobe, which is actually ITC Garamond.  (Garamond No. 3 (f3), Simoncini Garamond (ig), and Stempel Garamond (eg) are still other variations on the Garamond theme.)

lh
ls
lx
r1
     These abbreviations for Lucida typeface subfamilies, et al., solve a problem with names getting too long, or help conserve variant abbreviations.  See Variants.  Ideally, they would not exist.

ns
nt
tm
     Suppliers offer as many variations on the Times New Roman design as they do Garamond.  Adobe has Times, TimesNewRoman, and TimesNewRomanPS.  Although this last has been used by other foundries (e.g., Monotype) for a Times variation exactly compatible with Adobe's Times, Adobe itself also offers it, so we must have abbreviations for all three.

pi
     For pi fonts. Since names of pi fonts are rather arbitrary, it is not useful to try to assign typeface abbreviations to all of them. Instead, we use the supplier letter, pi, an arbitarily-assigned three-digit number, a weight and (if necessary) a variant. For example, mpi001r.  Pi font 001 for one supplier has nothing to do with pi font 001 for another.

Here is the table, from the file typeface.map.  It is organized alphabetically by abbreviation.  Each line consists of an abbreviation and directory name, possibly followed by PostScript FontNames and/or a comment in roman.  The FontName may be preceded by a letter S and a :, as in b:Dutch.  In that case, the S is a supplier abbreviation, and we've used that abbreviation for the given FontName from that supplier.

     [file typeface.map not included]

Weights
=======

The weight of a font specifies its boldness.  Arranged from lightest to heaviest (more or less):

     hairline, extra light, light
     book, regular, medium
     demibold, semibold, bold, extra bold, heavy
     black, ultra, poster

Here is the table, from the file weight.map.  It is organized alphabetically by abbreviation.  Each line consists of an abbreviation and any parts of a PostScript FontName which use that abbreviation.

          [file weight.map not included]

Variants
========

Variants include typeface variations (e.g., italic, sans serif), and font encodings (e.g., Adobe standard, TeX text).

A fontname may require multiple variants.  To resolve the worst ambiguities, we specify that any encoding variant (7, 8, or 9, see below) come last and any other numeral variant come first (to avoid confusion with a design size).  We recommend but do not require that the other variants be given in alphabetical order.  (It's not required because it's too painful to implement the sorting in TeX, and many existing names already have non-alphabetized variants.)

The letterspacing possibilities introduced by fontinst and virtual fonts have not yet become sufficiently widespread to make standardization beneficial.  Likewise for the many possible ways to generate small caps fonts.

Notes on specific variants, both old and new:

1
4
6
b
     These variants (`semisans', `bright', `semiserif', and `fax') were used only for single typefaces, so to conserve variant abbreviations, they now have typeface abbreviations instead.  Also, for b, to avoid too-long names; and for the others, to avoid variant vs. design-size ambiguities.

g
h
     Since these variants were not actually used in any font names, they are now obsolete and may be reassigned in the future.

5
6
7
8
9
     These characters begin a two-character encoding variant. Generally, 7 is for 7-bit encodings, 8 is for 8-bit encodings, and 9 is for expertised encodings with or without oldstyle digits (see the x item below), but this is not an absolute rule. Also, 5 is presently used for phonetic encodings and 6 for Cyrillic encodings.  The 9s (SuperFont) variant contain all of Adobe, Latin 1, and Expert glyphs, perhaps with slightly different metrics than the original fonts.

     For a font to be named with a certain encoding variant, it's not necessary that all the characters appear in precisely the same positions as in the encoding definition.  It's enough that the usual TeX macros work. In practice, this means that it's ok for a font to be labelled 7t if the only difference from Computer Modern is that the ligatures and the lslash and Lslash characters are different, since it's impossible to access or change the ligature table from TeX.  Standard PostScript fonts don't have an lslash character the way Computer Modern does, but they do have the Lslash and lslash characters themselves, so the usual TeX \lslash and \Lslash macros can be made to work via ligatures.  See the file T1.etx file in the fontinst distribution for details.

     If a name does not contain a specific encoding variant, its encoding is unspecified.  For example, some of the fonts distributed with Dvips(k) have names like ptmr for Times-Roman; they use the Dvips encoding (see dvips), which is close to (but not the same as) the TeX text encoding (as in Computer Modern Roman).  Similarly, the TFM files distributed with Dvilj(k) for the builtin LaserJet 4 fonts have names like cunm, since these fonts, while compatible with TeX text, contain many additional characters.

9
     These items are needed only because x (and possibly j) followed by a two-character regular variant makes some names too long. That is, 9t is equivalent in meaning to x7t, and 9d is equivalent to jx7t.  (This may not be true for all 9X encodings, though.)

k
z
     These variants (indicating Greek and Cyrillic fonts, respectively) are obsolete; future fonts in different scripts should be assigned an appropriate encoding abbreviation.  These are not currently standardized, due to ignorance of the appropriate encodings.  Please send suggestions for abbreviations to the address in Introduction.

m
v
y
     These math-related variants remain for the sake of typeface-specific math encodings, e.g., Lucida.  Fonts that use the Computer Modern math encodings should use 7m (see texmital), 7v (see texmext), and 7y (see texmsym).

n
     This is used for several different (but very rare) variants: only the Stone typeface has an ``informal'' variant, and only a few Monotype fonts have a ``schoolbook'' variant, with different `a', `g', and `y' shapes.

r
     Included only if no other variants, including encodings, apply, and either the width (see Widths) is not r or a design size is present.  I.e., r is only used as a placeholder.  When the normal version of the typeface is sans serif (e.g., Helvetica), r should be used when necessary, not s.  Use s only when the typeface family has both serif and sans serif variants.

s
t
     Mittelbach in TUGboat 13(1) suggests that these variants (for `sans' and `typewriter') should be identified as part of the typeface name, because there are few typeface families with these variants.  I feel that since they are logically variants, it's best to name them that way.  But LucidaSans (see Typefaces) and a few others are exceptions, to avoid too-long names.

x
8x
9?
     8x indicates a font in the Expert encoding itself. x indicates an expertised font, i.e., a composite (virtual) font that includes characters from an 8x font.  And in fact an xEE sequence is replaced by 9E, to save characters.

Fontname 1 assignments are shown in brackets in the following table, from the file variant.map.  It is organized alphabetically by abbreviation.  Each line consists of an abbreviation and either any parts of a PostScript FontName which use that abbreviation or the PostScript Encoding name.

          [file variant.map not included]

Widths
======

The width of a font specifies the compression or expansion of the font.  Arranged from narrowest to widest (more or less):

     ultra compressed, extra condensed, compressed, condensed, narrow
     regular
     semiextended, extended, expanded, wide

Expansion or compression of fonts is sometimes done automatically (as by the PostScript scale operator), and sometimes done by humans.  In the latter case, the human will also presumably choose a font name which includes `Extended' or `Expanded' or `Condensed' or `Narrow' or whatever according to their own preferences; the abbreviation can follow along. When creating a new synthetically expanded or compressed font for use with TeX, e.g., with Afm2tfm or fontinst, use n and e.

Here is the table, from the file width.map.  It is organized alphabetically by abbreviation.  Each line consists of an abbreviation and any parts of a PostScript FontName which use that abbreviation.

          [file width.map not included]

Long names
**********

Eight characters is not enough to unambiguously represent all fonts.  To do that, we have to allow ourselves arbitrarily long names.  Although we certainly cannot use such names for the files themselves, we could still use them in TeX documents given a simple mapping file, as discussed below.

A fontname mapping file
=======================

At the moment, most implementations of TeX look up a TFM file (as part of the \font command), by searching for a file with the name given by the user (possibly in any of series of directories).  But if we also looked TFM names up in another file (or set of files), which specifies the actual filename, the fontname given in the TeX source file could be almost anything at all, of any length.

In version 5.851d of Web2c, I implemented this mapping file.  Each file texfonts.map in a search path is read for abbreviations. The file has a straightforward format: each line specifies the filename and the TeX name for one font, separated by whitespace.  Extra information on the line is ignored; then more information could be specified for the benefit of DVI-reading programs in the same file.  Comments start with % and continue to the end of the line.

Besides allowing long names, this sort of mapping file has other benefits.  TeX source or DVI files can be more easily transported, because the font names in a particular file can be made to work on every system.  Also, when combined with a consistent naming scheme, macros could be written to access any of a number of fonts.  Right now, each font family has to have specialized macros written to deal with it.

Incidentally, Professor Knuth has approved this as a legitimate ``system-dependent'' extension; a TeX with such a feature can still be called ``TeX''.

A naming scheme for long names
==============================

Once we allow ourselves long names, we can construct a naming scheme to handle arbitrary fonts without much difficulty.  Here is one proposal, based on the X Window System font naming conventions.

     SUPPLIER-FAMILY-WEIGHT-VARIANTS-WIDTH-ENCODING--SIZE

SUPPLIER is the usual Adobe, Autologic, etc., as well as unknown or bizarre---this last meaning the rest of the name is nonstandard.  If the SUPPLIER is missing, i.e., the name starts with a -, ``public domain'' is assumed.  For fonts made by individuals, the initials of the designer would probably make a good SUPPLIER.

FAMILY is ComputerModern or Times or whatever.

Everything else is optional.  The -- before the SIZE lets one specify a name with, say, a weight and variants, but then skip the WIDTH and ENCODING, but still be able to give a size.

WEIGHT and WIDTH are as described earlier.

If there is more than one variant, they are separated with some character other than -, say =:

     B+H-Lucida-Bold-Sans=Typewriter--10

ENCODING is what Metafont calls the font_coding_scheme---the layout of the characters in the font. For example, Cork or ISOLatin1 or AdobeAlternate.

Names are case-sensitive, for consistency with the rest of TeX and with PostScript, etc.  Spaces cannot be used in the name, to make it easier for TeX to parse.  Likewise, characters with default category codes other than 11 (letter) or 12 (other) should not be used.

Another possibility is to forget all the above, and simply use the vendor's name (perhaps prefixed by the vendor): Times-Roman.

Font name lists
***************

These sections contain a list of fonts from various suppliers together with the corresponding names.

Standard PostScript fonts
=========================

Abbreviated names for the 35 standard PostScript fonts. An encoding variant, such as 8a for the Adobe StandardEncoding, is omitted.

pagk
     AvantGarde-Book

pagko
     AvantGarde-BookOblique

pagd
     AvantGarde-Demi

pagdo
     AvantGarde-DemiOblique

pbkd
     Bookman-Demi

pbkdi
     Bookman-DemiItalic

pbkl
     Bookman-Light

pbkli
     Bookman-LightItalic

pcrb
     Courier-Bold

pcrbo
     Courier-BoldOblique

pcrr
     Courier

pcrro
     Courier-Oblique

phvb
     Helvetica-Bold

phvbo
     Helvetica-BoldOblique

phvbrn
     Helvetica-NarrowBold

phvbon
     Helvetica-NarrowBoldOblique

phvr
     Helvetica

phvro
     Helvetica-Oblique

phvrrn
     Helvetica-Narrow

phvron
     Helvetica-NarrowOblique

pncb
     NewCenturySchlbk-Bold

pncbi
     NewCenturySchlbk-BoldItalic

pncri
     NewCenturySchlbk-Italic

pncr
     NewCenturySchlbk-Roman

pplb
     Palatino-Bold

pplbi
     Palatino-BoldItalic

pplri
     Palatino-Italic

pplr
     Palatino-Roman

psyr
     Symbol

ptmb
     Times-Bold

ptmbi
     Times-BoldItalic

ptmri
     Times-Italic

ptmr
     Times-Roman

pzcmi
     ZapfChancery-MediumItalic

pzdr
     ZapfDingbats

Adobe fonts
===========

The adobe.map file has abbreviations for Adobe fonts.

          [file adobe.map not included]

Apple fonts
===========

The apple.map file has abbreviations for Apple fonts.

          [file apple.map not included]

Bitstream fonts
===============

The bitstrea.map file has abbreviations for Bitstream fonts.

          [file bitstrea.map not included]

DTC fonts
=========

The dtc.map file has abbreviations for DTC (Digital Typeface Corporation) fonts.

          [file dtc.map not included]

ITC fonts
=========

The itc.map file has abbreviations for ITC (International Typeface Corporation) fonts.

          [file itc.map not included]

Linotype fonts
==============

The linotype.map file has abbreviations for Linotype fonts.

          [file linotype.map not included]

Monotype fonts
==============

The monotype.map file has abbreviations for Monotype fonts.

          [file monotype.map not included]

URW fonts
=========

Information graciously supplied through URW, via Vincent Ertner: Each URW font has an assigned font number.  The last character describes the size or purpose of the font, as the design of the font is optimized accordingly:

X000000E
     Extreme: 8pt and smaller

X000000T
     Text: between 8 and 18pt

X000000D
     Display: 18pt and larger

X000000P
     Poster: 48pt and larger

X000000M
     Monospaced / Typewriter

X000000L
     LaserWriter / PostScript / Adobe compatible

X000000I
     Intellifont PCL (5) compatible

An F identifier is not known.

The urw.map file has abbreviations for URW fonts.

          [file urw.map not included]

Encodings
*********

The following sections define various encodings as PostScript encoding vectors.  These files can be installed in the Dvips header directory and then used in psfonts.map to change font encodings of downloadable or builtin fonts (see psfonts.map (Dvips)).

You can also specify these .enc files to Afm2tfm when building a font (see Changing font encodings (Dvips)).

For a discussion of TeX font encodings in general, and defining new ones for use with fontinst in particular, see http://www.ctan.org/tex-archive/fonts/utilities/fontinst/doc/encspecs.

A tutorial on character code issues in general is available at http://www.cs.tut.fi/~jkorpela/chars.html.

Naming specific characters is a tangled and difficult area.  Here are some links to character tables for Unicode, Adobe, and WGL4, for your researching pleasure (thanks to Boguslaw Jackowski for the list):

  * http://www.unicode.org/Public/UNIDATA/UnicodeData.txt

  * http://www.unicode.org/Public/UNIDATA/NamesList.txt

  * http://partners.adobe.com/asn/tech/type/corporateuse-old.txt

  * http://partners.adobe.com/asn/tech/type/aglfn13.txt

  * http://partners.adobe.com/asn/tech/type/unicodegn.jsp

  * http://www.microsoft.com/OpenType/otspec/WGL4.htm

6w.enc: Cyrillic CP-1251
========================

     [file 8a.enc not included]

8a.enc: Adobe standard encoding
===============================

     [file 8a.enc not included]

8r.enc: TeX base encoding
=========================

     [file 8r.enc not included]

dvips.enc: Dvips encoding
=========================

     [file dvips.enc not included]

ec.enc: Cork encoding
=====================

     [file ec.enc not included]

groff.enc: groff encoding
=========================

     [file groff.enc not included]

t5.enc: T5 encoding
===================

     [file t5.enc not included]

qx.enc
======

From GUST.

     [file qx.txt not included]
     [file qx.enc not included]

texmext.enc: TeX math extension encoding
========================================

     [file texmext.enc not included]

texmsym.enc: TeX math symbol encoding
=====================================

     [file texmsym.enc not included]

texmital.enc: TeX math italic encoding
======================================

     [file texmital.enc not included]

texnansi.enc
============

From Y&Y.

     [file texnansi.enc not included]

texnansx.enc
============

From Y&Y.  texnansi without repeats.

     [file texnansx.enc not included]

xl2.enc: OT1 + ISO Latin 2 extended
===================================

     [file xl2.enc not included]

xt2.enc: typewriter OT1 + ISO Latin 2 extended
==============================================

     [file xt2.enc not included]