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

Re: fontname postfixes

Karl Berry <karl@cs.umb.edu> tastet:
>     I can't seem to find the rule for fontname postfix building:
> It's not a postfix.  It's just multiple variants or variant/width stuff.
> The multiple variants are listed in arbitrary (but alphabetical in my
> lists) order.  This is in the manual.
>     *8r is font encoded with 8r.enc.
>     *8rn is ... ?
>     *8rc ?
>     *8rp ?
> It depends on what comes before the 8r.  If it's just the supplier and
> typeface, then these have to interpreted as variants, and then
> n=informal, c=smallcaps, p=ornaments.

Ok, my head is spinning now :-)

I have this insane ambition of making xdvik work with t1 fonts with
minimal font maps and not too complex font decoding code inside xdvi
either.  I dislike psfonts.map of dvips.  Maybe some of you (err, is
tes-fonts just Karl?) can shed some light, come up with ideas.

When xdvik sees 'ptmr8r' I want it to load the Times Roman font
and 8r encode it.  A naive first stab resulted in this heuristic
(or whatever it's called):

1. Look for ptmr8r which is what the dvi file says it wants.
   (This is good for finding cmr10.pfb when the dvi file wants cmr10)
2. Not found?  Is that ending a encoding we know? Yes 8r is a known
   encoding, remove it.  We get ptmr.
3. Look for ptmr.
4. Found ptmr.pfa load and 8r encode it.
5. Font ready for rendering and painting.

I have a tool to set up ghostscript and standard t1 fonts in the texmf
hierarchy matching such a scheme and I have a xdvik set up which can
find fonts named this way.

A look in the map files tells me this would work with ... a lot of fonts.
The exceptions that needs to be listed in a map file are few.

The encodings would come from a map file such as this:

% Ending   Encoding file
8r		8r.enc
8y		texnansi.enc

More can be listed as they come into use.  I also want to map the fonts
that does not fit this scheme: ones that need extention, slanting, or
have names that are not 'orthogonal' in the naive decoding scheme, such
as phvr8rn for Helvetica-Narrow (n=informal?).  In teTeXs current

- not 'orthogonal': 66
- extended: 26
- slanted: 27

Ok, that's not a _short_ list, but it's less than 311.

Is this insane?  Does code exist that would let me do this?  Ideas?