[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC -- a TeX font naming system

X-News: bv8500 comp.text.tex:2885
From: Damian.Cugley@prg.ox.ac.uk (Damian Cugley)
Subject:RFC -- a TeX font naming system
Date: 17 Apr 91 15:34:01 GMT

This article describes an alternative approach to naming TeX fonts -- I
would be interested to see if anyone thinks it has anything going for it.


If we stick to the 6- or 8-character names we have to resort to
outrageous abbreviations -- Karl Berry's gallant efforts
notwithstanding.  These in turn either have to be centrally controlled
so that everyone uses the same names (which is a pain when new fonts
become available).

What we need is a system whereby the TeX name for a font can be deduced
>From its external name without any ambiguity, and where TeX names are
relatively intelligible.  Here is a system that I think has some merits;
afterwards I will show how I think it can be implemented on top of
different sorts of filing system.

Font names have a fixed syntax which goes like this:

    <font name> --> [ <foundry> - [ <family> - ] ] <cut>
    <foundry> --> <component>
    <family> --> <component>
    <cut> --> <component>
    <component> --> <letter> { <letter> | <digit> }.

Here "-" stands for a hyphen token and <letter> and <digit> for letters
or digits respectively.  [...] enclose optional material and stuff in
{...} can appear zero or more times.

For example:

    Adobe-Courier-cbo		Courier Bold Oblique
    Bistream-Charter-chi	Charter Italic
    pdc-mabx10			Malvern Bold Expanded 10pt
    pdc-ditc18			Ditko Compressed 18pt
    cmr12			Computer Modern Roman 12pt
    cmmi10			Computer Modern Math Italic 10pt

The form <foundry>-<family>-<cut> is used for fonts from commerical
manufacturers, who have a large number of families each with several
individual font files (which I will eccentrically refer to as cuts).
Usually the company will not be directly involved with porting their
fonts to the TeX world.

The second form, <foundry>-<cut> is used for typefaces where the
"foundry" is a single person or small institution.  Generally these will
turn out to be PD fonts created using METAFONT or PostScript directly.

The third form is for fonts supplied with TeX as part of the CMR
"meta-family" or one-off fonts that supply specialized symbols -- in
other words, almost all of currently existing TeX fonts.


The <cut> name for a font looks like an old-style TeX name and will
generally be along these lines --

    <family abbrev><suffix><optional size>

    <optional size> --> <empty> 	-- one size font 
	| <digits> [ p <digits> ]	-- size in points -- 7p5 == 7.5 pt
	| <digits> m [ <digits> ]	-- size in mm -- 3m5 == 3.5 mm

The <family abbrev> is a 1-, 2- or 3- letter abbrev for the family name.
For the 3-part font names this is just a placeholder taken from the
initials of the family name.  For 2-part and 1-part <font name>s, this
will be chosen by the designer.

The <suffix> is the usual "bold italic" or "thin oblique" type stuff,
and possibly things like "csc" or "mi" meaning it is a different
selection of symbols from a particular face.  For fonts imported from
outside the TeX world (which will have 3-part names), the <suffix> is
derrived from the font designer's description of the font, [table of
abbreviations for goes here].  Someone designing a new METAFONT family
can use whatever <suffix>es takes their fancy.

Certain combinations of long suffixes, long <optional size>s and
3-letter font names might be able to lead to <cut>s more than 8 chars
long.  This can be avoided by using a Univers-style numeric system
("68c" for semibold condensed italic caps-&-s.caps instead of
"sbcicsc"), or simply shoved under the carpet...


Foundries and families allow different designers to not have to worry
about their fonts having overlapping names -- so long as the foundries
are unique!  [Rules for shortening company names go here.]

For 2-part names, which usually have a <foundry> named after a person or
academic institution, normally the "foundry" will be involved with
making them available and can make their own decision about what name
should be used!


The munging of file names is part of the system-dependent part of TeX.
All this system requires is that "-" be given a special meaning.  What
meaning exactly depends on implemntation.  It should be assumed that the
MS-DOS limit of 8 case-folded characters of each <component> are

Some examples.

 \\ A HAL 9000 has a filing system with a flat namespace of
    40-character monocase names.  It can map the up to 24 significant
    characters of a font name onto a filename like "TEXFONT@ADOBE@TIMES@TBI"
    or "TEXFONT@PDC@MA24".

 \\ A Lose-O-Matic 770 has a directory structure with short (8-char)
    names.  By interpreting the "-" as a directory separator, it sees
    Adobe-Times-tbi as a file TBI in a subdirectory TIMES of a directory
    ADOBE of the TeX font area.

 \\ A BSD UNIX system has a directory structure *and* long names.  It
    can use whatever sysem is most convenient (I favour mapping "-" to "/").

 \\ A Creton-X50 has a flat name space *and* short names.  All fonts are
    given a code number when installed and are put in files with names
    f0000, f0001, f0002, ...; a "directory file" contains a list of font
    names and font code numbers.  <foundry>s and <families> have
    associated directory files referenced from the top level directory
    file.  In other words, the hapless Creton-X50 implementors have to
    "roll their own" directory structure.  (This is why I limited <font
    name>s to three <component>s.)

 //- Damian Cugley ----\  /--- Oxford University Computing Laboratory, -\ 
 ||  pdc@prg.ox.ac.uk  || \--- 11 Keble Rd, Oxford, UK  OX1 3QD --------/ 
 ||  pdc@uk.ac.ox.prg  ||                                               
  \--------------------//   "His feet are the wrong size for his shoes."