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

dvips and psfonts.vmap



Well, handling Adobe's Expert and Alternate fonts isn't too painful: we
can just add new variants `x' (`e' is already taken) and `a'.

But
> The StoneInformal Italics have two variants - Informal and Italic.
I can't believe I didn't think of this before.  Of *course* some
typefaces can have multiple variants.  Damn, damn, damn.  I don't see
any good solution to this.  I suppose I could randomly allocate a
variant letter for `informal italic' and `sans slanted', which will
solve the immediate problem, of generating names for the fonts
distributed with Tom's dvips.  But we will rapidly run out of letters
once we start having `Lucida Typewriter Small Caps Sans Serif Informal
Oblique', for example...  And yet just appending the letters will lead
to ambiguities; for example, is
pstso

Stone Sans Oblique or Stone Sans Extra Condensed?

I am depressed.

karl@cs.umb.edu

(here is the latest version of the article, for those who haven't seen
it since the initial discussion some months ago)

% Font naming proposal.
% 
%%  @texfile{
%%    author = "Karl Berry",	
%%    version = "1.2",
%%    date = "29 October 1990",
%%    filename = "fontname.tex",
%%    email = "karl@cs.umb.edu",
%%    address = "135 Center Hill Rd. // Plymouth, MA 02360",
%%    codetable = "ISO/ASCII",
%%    docstring = "This article describes a naming scheme for fonts that
%%                 is supposed to be implementable on all the computers
%%                 on which TeX runs."
%%  }
%% 
%
% Use the TUGboat macros.
\input tugboat.sty

% Simple abbreviations.
% 
\def\host#1{{\tt #1}}
\def\filename#1{{\tt #1}}
\def\journal#1{{\sl #1}}
\def\fontletter#1{{\tt #1}}
\def\program#1{{\tt #1}}


% I use \table to make the lists of abbreviations.  #1 is the category.
% \table also starts a new section.
% 
\def\table#1{%
  \head
  #1
  \endhead
  \halign\bgroup
     \indent\tt ##\hfil\quad
    &\vtop{%
       \advance\hsize by -\parindent % The \indent in the first column.
       \advance\hsize by -1em        % The \quad.
       % One table has two-letter abbreviations.
       \advance\hsize by -2\fontdimen7\tentt
       \rm\noindent ##}\hfil
    \cr
}

\def\endtable{%
  \egroup % End the \halign.
  \smallskip % I don't know what kind of space you want, but it needs
             %  something here.
}%


% Within the \table's, I use \entry for each row.
% #1 is the abbreviation, #2 the meaning.
% 
\def\entry#1#2{#1&#2\cr}

% I use \shortlist to make two lists of very short items that need no
% marker.
% 
\def\shortlist{\list[\unitemized\tag{\empty}][\cols=2]}


\title * Filenames for fonts *
\author * Karl Berry *
\address * 135 Center Hill Rd. \\ Plymouth, MA 02360 *
\netaddress * karl@cs.umb.edu *

\article
As more typeface families become available for use with \TeX, the need
for a consistent, rational naming scheme for the font filenames
concomitantly grows. Some (electronic) discussion has gone into the
following proposal; I felt it was appropriate now to bring it before a
wider community.  In some respects, it follows and simplifies
Mittelbach's and Sch\"opf's article in \journal{TUGboat}, volume~11,
number~2 (June 1990).

Here are some facts about fonts that went into the hopper when creating
this proposal:

\list

\item \TeX\ runs on virtually all computers, under almost as many operating
systems, all with their own idea of how files should be named.  Any
proposal regarding filenames, therefore, must cater to the lowest common
denominator.  That seems to be eight characters in length, not counting any
extension, and with case being insignificant.  Characters other
than letters and numerals are probably unusable.

\item Most typefaces are offered by several vendors.  The version
offered by vendor~A is not compatible with that of vendor~B.

\item Typefaces typically come in different weights (hairline to extra
heavy), different expansions (ultra condensed to wide), and an
open-ended range of variants (italic, sans serif, typewriter,
shadow,~$\ldots$).  No accepted standards exist for any of these
qualities, nor are any standards ever likely to gain acceptance.

\item The Computer Modern typeface family preserves traditional typesetting
practice in at least one important respect: different sizes of the same
font are not scaled linearly.  This is in contrast to most commercial fonts
available.

\endlist


Here is how I propose to divide up the eight characters:
||
   FTTWVEDD
||
where
\list
\item |F| represents the foundry that produced the font, and is omitted
if there isn't one.

\item |TT| represents the typeface name.

\item |W| represents the weight.

\item |V| represents the variant, and is omitted if both it and the
expansion are ``normal''.

\item |E| represents the expansion, and is omitted if it is ``normal''.

\item |DD| represents the design size, and is omitted if the font is
linearly scaled from a single {\tt tfm} file.

\endlist

See the section on virtual fonts (towards the end) for an exception to
the above.

The weight, variant, and expansion are probably all best taken from the
original source of the typeface, instead of trying to relate them to
some external standard.

Before giving the lists of abbreviations, let me point out two problems,
to neither of which I have a good solution.  1)~Assuming that only the
English letters are used, two letters is enough for only 676 typeface
families (even assuming we want to use all possible combinations, which
is doubtful).  There are many more than 676 typeface families in the
world.  2)~Fonts with design sizes over 100$\,$pt are not common, but
neither are they unheard of.

On to the specifics of the lists.  If you adopt this proposal at your
own installation, and find that you have fonts with some property I
missed, please write to me (see the end of the article for various
addresses), so I can update the lists.  You can get the
most up-to-date version of these lists electronically, by anonymous ftp
>From the host \host{ftp.cs.umb.edu}.  I will also send them to you by
electronic mail, if necessary.

I give the letters in lowercase, which is preferred on systems where
case is significant.  The lists are in alphabetical order by the
abbreviations.

\table{Foundry}

\entry{a}{Autologic}
\entry{b}{Bitstream}
\entry{c}{Compugraphic}
\entry{g}{Free Software Foundation ({\tt g} for GNU)}
\entry{h}{Bigelow \& Holmes (with apologies to Chuck)}
\entry{i}{International Typeface Corporation}
\entry{p}{Adobe ({\tt p} for PostScript)}
\entry{r}{reserved for use with virtual fonts; see below}
\entry{s}{Sun}
\endtable


\table{Typeface families}

\entry{ad}{Adobe Garamond}
\entry{ag}{Avant Garde}
\entry{ao}{Antique Olive}
\entry{at}{American Typewriter}
\entry{bb}{Bembo}
\entry{bd}{Bodoni}
\entry{bg}{Benguiat}
\entry{bk}{Bookman}
\entry{bl}{Balloon}
\entry{bv}{Baskerville}
\entry{bw}{Broadway}
\entry{cb}{Cooper Black}
\entry{cl}{Cloister}
\entry{cr}{Courier}
\entry{cn}{Century}
\entry{cs}{Century Schoolbook}
\entry{hv}{Helvetica}
\entry{gm}{Garamond}
\entry{go}{Goudy Oldstyle}
\entry{gs}{Gill Sans}
\entry{jo}{Joanna}
\entry{lc}{Lucida}
\entry{lt}{Lutetia}
\entry{nc}{New Century Schoolbook}
\entry{op}{Optima}
\entry{pl}{Palatino}
\entry{pp}{Perpetua}
\entry{rw}{Rockwell}
\entry{st}{Stone}
\entry{sy}{Symbol}
\entry{tm}{Times}
\entry{un}{Univers}
\entry{uy}{University}
\entry{zc}{Zapf Chancery}
\entry{zd}{Zapf Dingbats}
\endtable


\table{Weight}

\entry{a}{hairline}
\entry{b}{bold}
\entry{c}{black}
\entry{d}{demi}
\entry{h}{heavy}
\entry{i}{extra light}
\entry{k}{book}
\entry{l}{light}
\entry{m}{medium}
\entry{r}{regular}
\entry{s}{semi}
\entry{t}{thin}
\entry{u}{ultra}
\entry{x}{extra bold}
\endtable

In order of lightest to heaviest (more or less):
\nobreak
\shortlist
  hairline
  thin
  extra light
  light
  book
  regular
  medium
\colsep
  demibold
  semi
  bold
  extra bold
  heavy
  black
  ultra
\endlist


\table{Variant}

\entry{a}{alternate}
\entry{b}{bright}
\entry{c}{small caps}
\entry{e}{engraved}
\entry{g}{grooved (as in the IBM logo)}
\entry{h}{shadow}
\entry{i}{(text) italic}
\entry{l}{outline}
\entry{n}{informal}
\entry{o}{oblique (i.e., slanted)}
\entry{r}{normal (roman or sans)}
\entry{s}{sans serif}
\entry{t}{typewriter}
\entry{u}{unslanted italic}
\entry{x}{expert}
\endtable

If the variant is {\tt r}, and the expansion is also normal, both the
variant and the expansion are omitted.  When the normal version of the
typeface is sans serif (e.g., Helvetica), \fontletter{r} should be used,
not \fontletter{s}.  Use \fontletter{s} only when the typeface family
has both serif and sans serif variants.  The ``alternate'' variant
(\fontletter{a}) is used by some Adobe fonts that have oldstyle digits.
The ``expert'' variant (\fontletter{x}) is also used by some Adobe
fonts.


\table{Expansion}

\entry{c}{condensed (by hand)}
\entry{e}{expanded (automatic)}
\entry{n}{narrow (automatic)}
\entry{o}{extra condensed}
\entry{}{regular, normal, medium (always omitted)}
\entry{w}{wide}
\entry{x}{extended (by hand)}
\endtable

In order of narrowest to widest (more or less):

\shortlist
  extra condensed
  condensed
  narrow
  regular
\colsep
  extended
  expanded
  wide
\endlist

Expansion of fonts is sometimes done automatically (as in PostScript
{\bf scale}), and sometimes done by humans.  I chose `narrow' and
`expanded' to imply the former, and `condensed' and `extended' to imply
the latter, as I believe this reflects common usage.


\head * Virtual fonts *

In concert with releasing \TeX~3.0 and \MF~2.7, Don Knuth wrote two new
utility programs: \program{VFtoVP} and \program{VPtoVF}, which convert
to and from ``virtual'' fonts.  Virtual fonts provide a general
interface between the writers of \TeX\ macros and font suppliers.
In general, therefore, it is impossible to come up with a general scheme
for naming virtual fonts, since each virtual font is an individual
creation, possibly bringing together many unrelated fonts.

Nevertheless, one common case is to use virtual fonts to map \TeX's
default accent and other character code conventions onto a
vendor-supplied font.  For example, \program{dvips} (by Tom Rokicki)
does this for fonts given in the PostScript ``standard encoding''.
In this case, each font consists of a ``virtual'' tfm file, which is
what TeX uses, a ``raw'' tfm file, which corresponds to the actual
device font, and a vf file, which describes the relationship between the
two.

This adds another dimension to the space of font names, namely,
``virtualness'' (or rather, ``rawness'', since it is the virtual tfm
files that the users want to see).  But we have already used up all
eight characters in the font names.

The best solution I have been able to think of is this: prepend
\fontletter{r} to the raw tfm files; the virtual tfm files should be
named with the usual foundry prefix.  For example, the virtual Times
Roman tfm file is named \filename{ptmr}, as usual; the raw Times Roman
tfm file is named \filename{rptmr}.  To prevent intolerable confusion, I
promise never to give a foundry the letter \fontletter{r}.

This scheme will work only as long as the virtualized fonts do not have
design sizes; if they do, another foundry letter will have to be
allocated, it seems to me.

A pox upon the houses of those who decided on fixed-length filenames!


\head * Examples *

In closing, I will give two examples.  First, the fonts in the Univers
typeface family were assigned numbers by its designer, Adrien Frutiger. 
(You can see the scheme on, for example, page~29 of {\sl The Art of
Typo.icon.ography}, by Martin Solomon.)  Naturally, we want to give
them names.

\list[\tag{\empty}\unitemized]
  45 (light): \filename{unl}
  46 (light italic): \filename{unli}
  47 (light condensed): \filename{unlrc}
  48 (light condensed italic): \filename{unlic}
  49 (light extra condensed): \filename{unlro}
  53 (medium extended): \filename{unmrx}
  55 (medium): \filename{unm}
  56 (medium italic): \filename{unmi}
  57 (medium condensed): \filename{unmrc}
  58 (medium condensed italic): \filename{unmic}
  59 (medium extra condensed): \filename{unmro}
  63 (demibold extended): \filename{undrx}
  65 (demibold): \filename{und}
  66 (demibold italic): \filename{undi}
  67 (demibold condensed): \filename{undrc}
  68 (demibold condensed italic): \filename{undic}
  73 (bold extended): \filename{unbrx}
  75 (bold): \filename{unb}
  76 (bold italic): \filename{unbi}
  83 (extra bold extended): \filename{unxrx}
\endlist

Second, here are names for the 35 standard PostScript fonts:

\list[\tag{\empty}\unitemized]
  AvantGarde-Book: \filename{pagk}
  AvantGarde-BookOblique: \filename{pagko}
  AvantGarde-Demi: \filename{pagd}
  AvantGarde-DemiOblique: \filename{pagdo}
  Bookman-Demi: \filename{pbkd}
  Bookman-DemiItalic: \filename{pbkdi}
  Bookman-Light: \filename{pbkl}
  Bookman-LightItalic: \filename{pbkli}
  Courier-Bold: \filename{pcrb}
  Courier-BoldOblique: \filename{pcrbo}
  Courier: \filename{pcrr}
  Courier-Oblique: \filename{pcrro}
  Helvetica-Bold: \filename{phvb}
  Helvetica-BoldOblique: \filename{phvbo}
  Helvetica-NarrowBold: \filename{phvbrn}
  Helvetica-NarrowBoldOblique: \filename{phvbon}
  Helvetica: \filename{phvr}
  Helvetica-Oblique: \filename{phvro}
  Helvetica-Narrow: \filename{phvrrn}
  Helvetica-NarrowOblique: \filename{phvron}
  NewCenturySchlbk-Bold: \filename{pncb}
  NewCenturySchlbk-BoldItalic: \filename{pncbi}
  NewCenturySchlbk-Italic: \filename{pncri}
  NewCenturySchlbk-Roman: \filename{pncr}
  Palatino-Bold: \filename{pplb}
  Palatino-BoldItalic: \filename{pplbi}
  Palatino-Italic: \filename{pplri}
  Palatino-Roman: \filename{pplr}
  Symbol: \filename{psyr}
  Times-Bold: \filename{ptmb}
  Times-BoldItalic: \filename{ptmbi}
  Times-Italic: \filename{ptmri}
  Times-Roman: \filename{ptmr}
  ZapfChancery-MediumItalic: \filename{pzcmi}
  ZapfDingbats: \filename{pzdr}
\endlist


Please contact me if you have any comments or additions.

\makesignature
\endarticle