[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
longer names for Tex fonts
During the time I was struggling to fit Malvern into the existing LaTeX
framework and the then-current naming scheme, one of the things I missed
in the KB naming scheme -- and the proposed replacements -- is the
ability of the naming scheme to delegate part of the space of possible
font names to other schemes, allowing for future expansion and the
like. I concocted my own long-name scheme (it was obvious to me, even
back then, that a mapping file was the way to go). I'll try to
summarize it here; I don't have the original documents to hand.
1. A font name is a series of one or more "atoms" separated by hyphens,
where an atom is a sequence of letters, digits and perhaps underscores.
Letter case is not folded when comparing names, but names should not be
chosen that depend on this (this is to allow for direct mapping on to
file names on some systems). Atoms are limited to 31 characters
(Macintosh file name length). Spaces are forbidden (this would confuse
2. Atoms may be empty, i.e., of zero length. This is indicated by two
adjacent hyphens or a leading or trailing hyphen. The name consisting
of just the empty atom is forbidden (or might be used to represent "no
font" or "all fonts" in some contexts if this is useful).
3. Names consisting of a single atom are taken to be in the exisiting
naming scheme (Karl Berry's names, plus the standard TeX font names,
etc.). This means that "ptmr" ands "cmr12" are still valids name and
means the same thing as they do now.
4. Names consisting of more than one atom, of which the first is the
empty atom, are taken to be XLFD names (as used in the X11 window
system). Since XLFD names all start with a hyphen, they already fit
this pattern. This means the names like
also valid names and also mean more or less the same as they do to X.
(Obviously there are problems with asterisks and spaces being allowed in
XLFD names. Getting the details right is left as an exercise for the
5. Finally, we have multi-atom names with a non-empty leading atom.
This atom is a namespace name, used in much the same was as the scheme
name in a URL. Different namespaces may treat the subsequent atoms
6. One namespace, "x", is reserved for experimental, temporary,
special-purpose fonts, in much the same way "x-" prefixes are used in
most Internet conventions.
7. The namespace "p" is for fonts with PostScript names. (This does
not restrict its use to PostScript fonts, merely to those for which a
PostScript style name is available.) An example name is
"p-Times-Italic-Extend800-OT1". The final atom gives the encoding. (I
originally made a fairly long list of encodings. Some of them had
several flavours, one with Expert fonts and one without, or with or
without old-style figures or small caps.) Atoms like "Extend800" and
"Slant167" represent geometrical transformations on the font. There may
be several of these, or none. The remaining atoms are taken direct from
the PostScript name for the font. (In the case of fonts synthesized
>From a font and its corresponding Expert or Alt fonts, the majority font
name is the one used.)
8. Other namespaces might be defined at a later date, or assigned to
developers of fonts who can't fit their fonts neatly into the "p"
namespace. Fonts for Oriental languages might fit into this category.
The "p" names (rule 7) avoid the requirement for lists of codes for
foundries or families by relying on work that must already be done to
keep PostScript font names from clashing. The result is, IMO,
reasonably readable, and much less cryptic-looking than some other
proposals. It is also perfectly possible to imagine scripts that parse
such names and generate Fontinst driver files that create them. They
are also fairly predictable, especially if you require the atoms
representing transforms appear in a particular order (if they are used
at all). Back when I still worked with TeX I used "p" names for all the
fonts I synthesized.
I suspect that rule-4 (XLFD) names won't be particularly useful, because
they specify both toom much (pixels-per-inch values) and too little.
They are included to appease people who would otherwise harp on about
XLFD as a solution.
LaTeX 2e people might want to define an "nfss" scheme which uses the
NFSS-2 abbreviations directly. This might have "nfss-T1-pkp9-m-n"
meaning "T1/pkp9/m/n", although this assumes we can define the meaning
of "T1/pkp9/m/n" outside of LaTeX.
This is just a suggestion. I don't any longer use TeX regularly, so I
may have forgotten some of the more technical details.
Damian Cugley -- firstname.lastname@example.org