www.delorie.com/gnu/docs/octave/kpathsea_72.html   search  
 
Buy GNU books!


Kpathsea: A library for path searching

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3.2 Fontmap

If a bitmap font or metric file is not found with the original name (see the previous section), Kpathsea looks through any fontmap files for an alias for the original font name. These files are named `texfonts.map' and searched for along the TEXFONTMAPS environment/config file variable. All `texfonts.map' files that are found are read; earlier definitions override later ones.

This feature is intended to help in two respects:

  1. An alias name is limited in length only by available memory, not by your filesystem. Therefore, if you want to ask for `Times-Roman' instead of `ptmr', you can (you get `ptmr8r').

  2. A few fonts have historically had multiple names: specifically, LaTeX's "circle font" has variously been known as `circle10', `lcircle10', and `lcirc10'. Aliases can make all the names equivalent, so that it no longer matters what the name of the installed file is; TeX documents will find their favorite name.

The format of fontmap files is straightforward:

If an alias has an extension, it matches only those files with that extension; otherwise, it matches anything with the same root, regardless of extension. For example, an alias `foo.tfm' matches only when `foo.tfm' is being searched for; but an alias `foo' matches `foo.vf', `foo.600pk', etc.

As an example, here is an excerpt from the `texfonts.map' in the Web2c distribution. It makes the circle fonts equivalent and includes automatically generated maps for most PostScript fonts available from various font suppliers.

 
circle10        lcircle10
circle10        lcirc10
lcircle10       circle10
lcircle10       lcirc10
lcirc10         circle10
lcirc10         lcircle10
...
include adobe.map
include apple.map
include bitstrea.map
...

Fontmaps are implemented in the file `kpathsea/fontmap.c'. The Fontname distribution has much more information on font naming (see section `Introduction' in Filenames for TeX fonts).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003