~ubuntu-branches/ubuntu/vivid/texlive-bin/vivid

« back to all changes in this revision

Viewing changes to texk/tetex/updmap.pl

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-06-23 12:57:25 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20120623125725-usp25qvphkyd6jlm
Tags: 2012.20120623-1
* post release fixed from Peter Breitenlohner (will be included upstream):
  - (patch-dvi2tty, patch-lacheck) Ken Brown <kbrow1i@gmail.com> has noteda
  that already moderately long pathnames may yield buffer overruns in 
  lacheck and dvi2tty.
  - (patch-icu) three ICU library files have been modified (undoing ICU 
  SVN commit 36090 from 2009-06-11), in order to solve all/most XeTeX 
  problems with Indic scripts.
  - (patch-pdftex) a small change in pdftexdir/pdftosrc.cc required to
  build pdfTeX with poppler >=0.18.4 (system-xpdf).  Note, however, that 
  building pdfTeX that way slightly reduces its capability to handle large 
  files (see README.config 1.6 and 3.4.2).
* update updmap man page (Closes: #677300)
* (pulled from upupstream cvs, patch xdvi-upupstream-fixes)
  - Fixed bugs in property handling on 64-bit systems (related to source 
    specials).
  - Added support for XkbBell, to make the console bell work again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env perl
2
2
# mupdmap: utility to maintain map files for outline fonts.
3
 
# $Id: updmap.pl 26616 2012-05-24 00:59:37Z preining $
 
3
# $Id: updmap.pl 26891 2012-06-10 22:41:49Z karl $
4
4
5
5
# Copyright 2011, 2012 Norbert Preining
6
6
# This file is licensed under the GNU General Public License version 2
15
15
# limitation.
16
16
#
17
17
# TODO
18
 
# - $HOME and sudo and updmap-sys horror
19
 
#   some instances of sudo do not reset $HOME to the home of root
20
 
#   as an effect of "sudo updmap" creates root owned files in the home 
21
 
#   of a normal user, and "sudo updmap-sys" uses map files and updmap.cfg
22
 
#   files from the directory of a normal user, but creating files
23
 
#   in TEXMFSYSCONFIG. This is *all* wrong.
24
 
#   We should check: if we are running as UID 0 (root) on Unix and the
25
 
#   env{HOME} is NOT the same as the one of root, then give a warning
26
 
#   and reset it to the real home dir of root.
27
 
#   If we don't want to read /etc/passwd to find out the home dir of
28
 
#   root, we could simply check for /root/ being contained in HOME,
29
 
#   or check only for /root/ and if it is different reset $HOME to
30
 
#   some non-existing directory.
31
18
# - check all other invocations
32
19
# - after TL2012? Maybe remove support for reading updmap-local.cfg
33
20
#
38
25
  $^W=1;
39
26
  $TEXMFROOT = `kpsewhich -var-value=TEXMFROOT`;
40
27
  if ($?) {
41
 
    print STDERR "(m)updmap: Cannot find TEXMFROOT, aborting!\n";
 
28
    print STDERR "updmap: Cannot find TEXMFROOT, aborting!\n";
42
29
    exit 1;
43
30
  }
44
31
  chomp($TEXMFROOT);
46
33
}
47
34
 
48
35
 
49
 
my $version = '$Id: updmap.pl 26616 2012-05-24 00:59:37Z preining $';
 
36
my $version = '$Id: updmap.pl 26891 2012-06-10 22:41:49Z karl $';
50
37
 
51
38
use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
52
39
use strict;
56
43
#use Data::Dumper;
57
44
#$Data::Dumper::Indent = 1;
58
45
 
 
46
(my $prg = basename($0)) =~ s/\.pl$//;
 
47
 
 
48
# sudo sometimes does not reset the home dir of root, check on that
 
49
# see more comments at the definition of the function itself
 
50
# this function checks by itself whether it is running on windows or not
 
51
reset_root_home();
 
52
 
59
53
chomp(my $TEXMFMAIN = `kpsewhich --var-value=TEXMFMAIN`);
60
54
chomp(my $TEXMFVAR = `kpsewhich -var-value=TEXMFVAR`);
61
55
chomp(my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
68
62
  $TEXMFROOT = lc($TEXMFROOT);
69
63
}
70
64
 
71
 
my $prg = basename($0);
72
65
 
73
66
my %opts = ( quiet => 0, nohash => 0, nomkmap => 0 );
74
67
my $alldata;
227
220
      push @used_files, (win32() ? lc($f) : $f);
228
221
    }
229
222
    #
230
 
    # reorder used files: since we ship and manage with tlmgr 
231
 
    # the file in TEXMFSYSCONFIG, and TEXMFLOCAL has *lower* priority
232
 
    # then TEXMFSYSCONFIG, we move a TEXMFLOCAL-updmap.cfg if found
233
 
    # after TEXMFCONFIG TEXMFVAR and TEXMFHOME
234
223
    chomp(my $TEXMFLOCAL =`kpsewhich --var-value=TEXMFLOCAL`);
235
224
    chomp(my $TEXMFHOME =`kpsewhich --var-value=TEXMFHOME`);
236
225
    if (win32()) {
237
226
      $TEXMFLOCAL = lc($TEXMFLOCAL);
238
227
      $TEXMFHOME = lc($TEXMFHOME);
239
228
    }
 
229
    #
 
230
    # search for TEXMFLOCAL/web2c/updmap.cfg
 
231
    # see compatibility with updmap-local.cfg below
240
232
    my $found = 0;
241
233
    my $TMLabs = Cwd::abs_path($TEXMFLOCAL);
242
234
    if ($TMLabs) {
248
240
        }
249
241
      }
250
242
    }
 
243
    #
 
244
    # backward compatibility with TL2011 and before updmap-local.cfg
 
245
    # we read this instead of TEXMFLOCAL/web2c/updmap.cfg, but give
 
246
    # a big fat warning
251
247
    my $old_updmap_local_found = 0;
252
248
    if (-r "$TMLabs/web2c/updmap-local.cfg") {
253
249
      $old_updmap_local_found = 1;
254
250
      warning("Old configuration file TEXMFLOCAL/web2c/updmap-local.cfg found!\n");
255
251
      if ($found) {
256
252
        warning("Will read this file *instead* of TEXMFLOCAL/web2c/updmap.cfg!!!\n");
 
253
        # rest of the action is done in the reordering of cfg files
257
254
      } else {
258
255
        # if TEXMFLOCAL updmap.cfg does not exist, we have to make sure
259
256
        # that the replacement is added to the list of updmap files
261
258
      }
262
259
      warning("Please consider moving the information from updmap-local.cfg to TEXMFLOCAL/web2c/updmap.cfg\n");
263
260
    }
 
261
    #
 
262
    # reorder used files: we move TEXMFLOCAL (if used) just above TEXMFMAIN
 
263
    # as sysadmins will probably adjust values there
 
264
    #
 
265
    # updmap (user):
 
266
    # ==============
 
267
    # as found:
 
268
    # TEXMFCONFIG    $HOME/.texliveYYYY/texmf-config/web2c/updmap.cfg
 
269
    # TEXMFVAR       $HOME/.texliveYYYY/texmf-var/web2c/updmap.cfg
 
270
    # TEXMFHOME      $HOME/texmf/web2c/updmap.cfg
 
271
    # TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
 
272
    # TEXMFSYSVAR    $TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
 
273
    # TEXMFMAIN      $TEXLIVE/YYYY/texmf/web2c/updmap.cfg
 
274
    # TEXMFLOCAL     $TEXLIVE/texmf-local/web2c/updmap.cfg
 
275
    # TEXMFDIST      $TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
 
276
    # 
 
277
    # as used:
 
278
    # TEXMFCONFIG    $HOME/.texliveYYYY/texmf-config/web2c/updmap.cfg
 
279
    # TEXMFVAR       $HOME/.texliveYYYY/texmf-var/web2c/updmap.cfg
 
280
    # TEXMFHOME      $HOME/texmf/web2c/updmap.cfg
 
281
    # TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
 
282
    # TEXMFSYSVAR    $TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
 
283
    # TEXMFLOCAL     $TEXLIVE/texmf-local/web2c/updmap.cfg
 
284
    # TEXMFMAIN      $TEXLIVE/YYYY/texmf/web2c/updmap.cfg
 
285
    # TEXMFDIST      $TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
 
286
    # 
 
287
    # updmap-sys (root):
 
288
    # ==================
 
289
    # as found:
 
290
    # TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
 
291
    # TEXMFSYSVAR    $TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
 
292
    # TEXMFMAIN      $TEXLIVE/YYYY/texmf/web2c/updmap.cfg
 
293
    # TEXMFLOCAL     $TEXLIVE/texmf-local/web2c/updmap.cfg
 
294
    # TEXMFDIST      $TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
 
295
    # 
 
296
    # as used:
 
297
    # TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
 
298
    # TEXMFSYSVAR    $TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
 
299
    # TEXMFLOCAL     $TEXLIVE/texmf-local/web2c/updmap.cfg
 
300
    # TEXMFMAIN      $TEXLIVE/YYYY/texmf/web2c/updmap.cfg
 
301
    # TEXMFDIST      $TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
 
302
    #
264
303
    if ($found || $old_updmap_local_found) {
265
304
      my @tmp;
266
 
      my $local_pushed = 0;
267
305
      for my $f (@used_files) {
268
 
        if ($f =~ m!\Q$TEXMFCONFIG\E|\Q$TEXMFVAR\E|\Q$TEXMFHOME\E!) {
 
306
        if ($f =~ m!\Q$TEXMFMAIN/\E!) {
 
307
          if ($old_updmap_local_found) {
 
308
            push @tmp, "$TEXMFLOCAL/web2c/updmap-local.cfg";
 
309
          } else {
 
310
            # since we are under if ($found || $old_updmap_local_found)
 
311
            # we know that TEXMFLOCAL/web2c/updmap.cfg exists!
 
312
            push @tmp, "$TEXMFLOCAL/web2c/updmap.cfg";
 
313
          }
269
314
          push @tmp, $f;
270
315
        } else {
271
 
          if (!$local_pushed) {
272
 
            # should we use the return value of grep here, but we know
273
 
            # what we will find?!?!
274
 
            if ($old_updmap_local_found) {
275
 
              push @tmp, "$TEXMFLOCAL/web2c/updmap-local.cfg";
276
 
            } else {
277
 
              push @tmp, "$TEXMFLOCAL/web2c/updmap.cfg";
278
 
            }
279
 
            $local_pushed = 1;
 
316
          if ($f !~ m!\Q$TEXMFLOCAL\E!) {
 
317
            push @tmp, $f;
280
318
          }
281
 
          # push the original
282
 
          push @tmp, $f unless ($f =~ m!\Q$TEXMFLOCAL\E!);
283
319
        }
284
320
      }
285
321
      @used_files = @tmp;
1694
1730
      if ($b eq "Map" || $b eq "MixedMap" || $b eq "KanjiMap") {
1695
1731
        my $c = shift @rest;
1696
1732
        if (!defined($c)) {
1697
 
          warning("updmap: apparently not a real disable line, ignored: $_\n");
 
1733
          warning("$prg: apparently not a real disable line, ignored: $_\n");
1698
1734
        } else {
1699
1735
          if (defined($data{'maps'}{$c})) {
1700
 
            warning("updmap: double mentioning of $c in $fn\n");
 
1736
            warning("$prg: double mention of $c in $fn\n");
1701
1737
          }
1702
1738
          $data{'maps'}{$c}{'status'} = 'disabled';
1703
1739
          $data{'maps'}{$c}{'type'} = $b;
1707
1743
      next;
1708
1744
    }
1709
1745
    if (@rest) {
1710
 
      warning("updmap: line $i in $fn contains a syntax error, more than two words!\n");
 
1746
      warning("$prg: line $i in $fn contains a syntax error, more than two words!\n");
1711
1747
    }
1712
1748
    if (defined($settings{$a})) {
1713
1749
      if (check_option($a, $b)) {
1714
1750
        $data{'setting'}{$a}{'val'} = $b;
1715
1751
        $data{'setting'}{$a}{'line'} = $i;
1716
1752
      } else {
1717
 
        warning("updmap: unknown setting for $a: $b, ignored!\n");
 
1753
        warning("$prg: unknown setting for $a: $b, ignored!\n");
1718
1754
      }
1719
1755
    } elsif ($a eq "Map" || $a eq "MixedMap" || $a eq "KanjiMap") {
1720
1756
      if (defined($data{'maps'}{$b}) && $data{'maps'}{$b}{'type'} ne $a) {
1721
 
        warning("updmap: double mentioning of $b with conflicting types in $fn\n");
 
1757
        warning("$prg: double mention of $b with conflicting types in $fn\n");
1722
1758
      } else {
1723
1759
        $data{'maps'}{$b}{'type'} = $a;
1724
1760
        $data{'maps'}{$b}{'status'} = 'enabled';
1725
1761
        $data{'maps'}{$b}{'line'} = $i;
1726
1762
      }
1727
1763
    } else {
1728
 
      warning("updmap: unrecognized line $i in $fn: $_\n");
 
1764
      warning("$prg: unrecognized line $i in $fn: $_\n");
1729
1765
    }
1730
1766
  }
1731
1767
  return \%data;
1868
1904
  }
1869
1905
}
1870
1906
 
 
1907
 
 
1908
#
 
1909
# $HOME and sudo and updmap-sys horror
 
1910
#   some instances of sudo do not reset $HOME to the home of root
 
1911
#   as an effect of "sudo updmap" creates root owned files in the home 
 
1912
#   of a normal user, and "sudo updmap-sys" uses map files and updmap.cfg
 
1913
#   files from the directory of a normal user, but creating files
 
1914
#   in TEXMFSYSCONFIG. This is *all* wrong.
 
1915
#   we check: if we are running as UID 0 (root) on Unix and the
 
1916
#   ENV{HOME} is NOT the same as the one of root, then give a warning
 
1917
#   and reset it to the real home dir of root.
 
1918
 
 
1919
sub reset_root_home {
 
1920
  if (!win32() && ($> == 0)) {  # $> is effective uid
 
1921
    my $envhome = $ENV{'HOME'};
 
1922
    # if $HOME isn't an existing directory, we don't care.
 
1923
    if (defined($envhome) && (-d $envhome)) {
 
1924
      # we want to avoid calling getpwuid as far as possible, so if
 
1925
      # $envhome is one of some usual values we accept it without worrying.
 
1926
      if ($envhome =~ m,^(/|/root|/var/root)/*$,) {
 
1927
        return;
 
1928
      }
 
1929
      # $HOME is defined, check what is the home of root in reality
 
1930
      my (undef,undef,undef,undef,undef,undef,undef,$roothome) = getpwuid(0);
 
1931
      if (defined($roothome)) {
 
1932
        if ($envhome ne $roothome) {
 
1933
          warning("$prg: resetting \$HOME value (was $envhome) to root's "
 
1934
            . "actual home ($roothome).\n");
 
1935
          $ENV{'HOME'} = $roothome;
 
1936
        } else {
 
1937
          # envhome and roothome do agree, nothing to do, that is the good case
 
1938
        }
 
1939
      } else { 
 
1940
        warning("$prg: home of root not defined, strange!\n");
 
1941
      }
 
1942
    }
 
1943
  }
 
1944
}
 
1945
 
1871
1946
sub warning {
1872
1947
  print STDERR @_;
1873
1948
}
1887
1962
   or: $prg-sys [OPTION] ... [COMMAND]
1888
1963
 
1889
1964
Update the default font map files used by pdftex, dvips, and dvipdfm(x),
1890
 
(and optionally pxdvi) as determined by all configuration files updmap.cfg 
 
1965
and optionally pxdvi, as determined by all configuration files updmap.cfg 
1891
1966
(the ones returned by running "kpsewhich --all updmap.cfg", but see below).
1892
1967
 
1893
1968
Among other things, these map files are used to determine which fonts
1894
1969
should be used as bitmaps and which as outlines, and to determine which
1895
 
fonts are included in the output.
 
1970
font files are included in the PDF or PostScript output.
1896
1971
 
1897
1972
By default, the TeX filename database (ls-R) is also updated.
1898
1973
 
1899
1974
Options:
1900
1975
  --cnffile FILE            read FILE for the updmap configuration 
1901
 
                            (can be given multiple times, in which case
1902
 
                            all the files are used)
1903
 
  --dvipdfmxoutputdir DIR   specify output directory (dvipdfm syntax)
 
1976
                             (can be given multiple times, in which case
 
1977
                             all the files are used)
 
1978
  --dvipdfmxoutputdir DIR   specify output directory (dvipdfm(x) syntax)
1904
1979
  --dvipsoutputdir DIR      specify output directory (dvips syntax)
1905
1980
  --pdftexoutputdir DIR     specify output directory (pdftex syntax)
1906
1981
  --pxdvioutputdir DIR      specify output directory (pxdvi syntax)
1915
1990
Commands:
1916
1991
  --help                    show this message and exit
1917
1992
  --version                 show version information and exit
 
1993
  --showoption OPTION       show the current setting of OPTION
1918
1994
  --showoptions OPTION      show possible settings for OPTION
1919
 
  --showoption OPTION       show the current setting of OPTION
1920
 
  --setoption OPTION VALUE  set OPTION to value
 
1995
  --setoption OPTION VALUE  set OPTION to value; option names below
1921
1996
  --setoption OPTION=VALUE  as above, just different syntax
1922
1997
  --enable MAPTYPE MAPFILE  add "MAPTYPE MAPFILE" to updmap.cfg,
1923
 
                              where MAPTYPE is either Map, MixedMap, KanjiMap
 
1998
                             where MAPTYPE is Map, MixedMap, or KanjiMap
1924
1999
  --enable Map=MAPFILE      add \"Map MAPFILE\" to updmap.cfg
1925
2000
  --enable MixedMap=MAPFILE add \"MixedMap MAPFILE\" to updmap.cfg
1926
2001
  --enable KanjiMap=MAPFILE add \"KanjiMap MAPFILE\" to updmap.cfg
1927
 
  --disable MAPFILE         disable MAPFILE, whether Map, MixedMap, or KanjiMap
 
2002
  --disable MAPFILE         disable MAPFILE, of whatever type
1928
2003
  --listmaps                list all active and inactive maps
1929
2004
  --listavailablemaps       same as --listmaps, but without
1930
2005
                             unavailable map files
1932
2007
 
1933
2008
Explanation of the map types: the (only) difference between Map and
1934
2009
MixedMap is that MixedMap entries are not added to psfonts_pk.map.
1935
 
KanjiMap entries are added to psfonts_t1.map and kanjix.map.
1936
 
The purpose is to help users with printers that render Type 1 outline
 
2010
The purpose is to help users with devices that render Type 1 outline
1937
2011
fonts worse than mode-tuned Type 1 bitmap fonts.  So, MixedMap is used
1938
2012
for fonts that are available as both Type 1 and Metafont.
 
2013
KanjiMap entries are added to psfonts_t1.map and kanjix.map.
1939
2014
 
1940
 
Explanation of the possible OPTIONS (showoptions, showoptions, setoption):
 
2015
Explanation of the OPTION names for --showoptions, --showoptions, --setoption:
1941
2016
 
1942
2017
  dvipsPreferOutline    true|false  (default true)
1943
2018
    Whether dvips uses bitmaps or outlines, when both are available.
1944
 
  dvipsDownloadBase35   true|false  (default false)
 
2019
  dvipsDownloadBase35   true|false  (default true)
1945
2020
    Whether dvips includes the standard 35 PostScript fonts in its output.
1946
2021
  pdftexDownloadBase14  true|false   (default true)
1947
2022
    Whether pdftex includes the standard 14 PDF fonts in its output.
1948
2023
  pxdviUse              true|false  (default false)
1949
 
    Whether maps for pxdvi (Japanese-patched xdvi) is under control of updmap.
 
2024
    Whether maps for pxdvi (Japanese-patched xdvi) are under updmap's control.
 
2025
  kanjiEmbed            (any string)
 
2026
  kanjiVariant          (any string)
 
2027
    See below.
1950
2028
  LW35                  URWkb|URW|ADOBEkb|ADOBE  (default URWkb)
1951
2029
    Adapt the font and file names of the standard 35 PostScript fonts.
1952
2030
    URWkb    URW fonts with "berry" filenames    (e.g. uhvbo8ac.pfb)
1953
2031
    URW      URW fonts with "vendor" filenames   (e.g. n019064l.pfb)
1954
2032
    ADOBEkb  Adobe fonts with "berry" filenames  (e.g. phvbo8an.pfb)
1955
2033
    ADOBE    Adobe fonts with "vendor" filenames (e.g. hvnbo___.pfb)
1956
 
  kanjiEmbed            (any string)
1957
 
  kanjiVariant          (any string)
1958
2034
 
1959
2035
  These options are only read and acted on by updmap; dvips, pdftex, etc.,
1960
2036
  do not know anything about them.  They work by changing the default map
1962
2038
  command-line options or configuration files to the programs, as
1963
2039
  explained at the beginning of updmap.cfg.
1964
2040
 
1965
 
  The options kanjiEmbed and kanjiVariant govern special replacements
1966
 
  in the map lines. If a map contains the string \@kanjiEmbed\@, then
1967
 
  this will be replaced by the value of the respective option. Similarly
1968
 
  for kanjiVariant. This way users of Japanese TeX can select different
1969
 
  fonts to be included in the final pdf.
 
2041
  The options kanjiEmbed and kanjiVariant specify special replacements
 
2042
  in the map lines.  If a map contains the string \@kanjiEmbed\@, then
 
2043
  this will be replaced by the value of that option; similarly for
 
2044
  kanjiVariant.  In this way, users of Japanese TeX can select different
 
2045
  fonts to be included in the final output.
1970
2046
 
1971
2047
Explanation of trees and files normally used:
1972
2048
 
1973
 
  updmap reads all the updmap.cfg files found by
1974
 
    kpsewhich -all updmap.cfg
1975
 
  in the order returned by kpsewhich. There is one exception to keep
1976
 
  upgradability from earlier versions of TeX Live: If there is a file
1977
 
  TEXMFLOCAL/web2c/updmap-local.cfg (which was formerly used by tlmgr
1978
 
  to merge local fonts), then a (not necessarily existing) file
1979
 
  TEXMFLOCAL/web2c/updmap.cfg is ignored and the updmap-local.cfg is
1980
 
  used instead. In this case updmap recognizes also the syntax for
1981
 
  disabling map files in the updmap-local.cfg (this syntax was different
1982
 
  to what is used now!).
1983
 
 
1984
 
  According to the actions updmap might write to one of the given files or
1985
 
  create a new updmap.cfg, see below for details.
1986
 
 
1987
 
  If multiple updmap.cfg files are found, all the map files mentioned
1988
 
  in all the updmap.cfg files are merged.
1989
 
 
1990
 
  CAVEATS with multiple updmap.cfg files
1991
 
  * where changes are saved
1992
 
    If config files are given on the cmd line, then the first given will
1993
 
    be used to save changes (by --setoption, --enable or --disable).
1994
 
    If the config files are taken from kpsewhich, then the algorithm is 
1995
 
    more complex:
1996
 
    - if one of \$TEXMFHOME/web2c/updmap.cfg or \$TEXMFCONFIG/web2c/updmap.cfg
1997
 
      appears in the list of used files, then the one given *first* by
1998
 
      kpsewhich --all, or equivalently, the one given by kpsewhich updmap.cfg,
1999
 
      is used
2000
 
    - if none of the above two are present, a new config file is created
2001
 
      in \$TEXMFCONFIG/web2c/updmap.cfg (in case there are actual changes)
2002
 
      and used
2003
 
 
2004
 
  * multiple font definitions
2005
 
    If a font is defined multiple times in different maps, then the
2006
 
    definition of the map file that comes from the highest priority
2007
 
    updmap.cfg file is used.
2008
 
    If a font is defined multiple times in the same map file, an
2009
 
    arbitrary definition is used.
2010
 
    In both cases warnings are issued.
2011
 
 
2012
 
  * disabling map files
2013
 
    updmap.cfg files with higher priority can disable map files that
2014
 
    are mentioned in lower priority updmap.cfg files by disabling
2015
 
    them, i.e., writing
 
2049
  If --cnffile is specified on the command line (possibly multiple
 
2050
  times), its value(s) are used.  Otherwise, updmap reads all the
 
2051
  updmap.cfg files found by running \`kpsewhich -all updmap.cfg', in the
 
2052
  order returned by kpsewhich, with one exception: an updmap.cfg found
 
2053
  in TEXMFLOCAL is given higher priority than the updmap.cfg in
 
2054
  TEXMFMAIN, to ensure that local adjustments by administrators take
 
2055
  precedence over what is shipped in TeX Live.
 
2056
 
 
2057
  In any case, if multiple updmap.cfg files are found, all the maps
 
2058
  mentioned in all the updmap.cfg files are merged.
 
2059
 
 
2060
  Thus, if updmap.cfg files are present in all trees, and the default
 
2061
  layout is used as shipped with TeX Live, the following files are
 
2062
  read, in the given order.
 
2063
  
 
2064
  For updmap-sys:
 
2065
  TEXMFSYSCONFIG \$TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
 
2066
  TEXMFSYSVAR    \$TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
 
2067
  TEXMFLOCAL     \$TEXLIVE/texmf-local/web2c/updmap.cfg
 
2068
  TEXMFMAIN      \$TEXLIVE/YYYY/texmf/web2c/updmap.cfg
 
2069
  TEXMFDIST      \$TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
 
2070
 
 
2071
  For updmap:
 
2072
  TEXMFCONFIG    \$HOME/.texliveYYYY/texmf-config/web2c/updmap.cfg
 
2073
  TEXMFVAR       \$HOME/.texliveYYYY/texmf-var/web2c/updmap.cfg
 
2074
  TEXMFHOME      \$HOME/texmf/web2c/updmap.cfg
 
2075
  TEXMFSYSCONFIG \$TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
 
2076
  TEXMFSYSVAR    \$TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
 
2077
  TEXMFLOCAL     \$TEXLIVE/texmf-local/web2c/updmap.cfg
 
2078
  TEXMFMAIN      \$TEXLIVE/YYYY/texmf/web2c/updmap.cfg
 
2079
  TEXMFDIST      \$TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
 
2080
  
 
2081
  (where YYYY is the TeX Live release version).
 
2082
  
 
2083
  There is another exception to keep upgradability from earlier versions
 
2084
  of TeX Live: if a file TEXMFLOCAL/web2c/updmap-local.cfg exists
 
2085
  (formerly used by tlmgr to merge local fonts), then the file
 
2086
  TEXMFLOCAL/web2c/updmap.cfg is ignored (if it exists) and that
 
2087
  updmap-local.cfg is used instead.  In this case, updmap recognizes the
 
2088
  previous syntax for disabling map files in updmap-local.cfg (this
 
2089
  syntax is different from what is used now).
 
2090
 
 
2091
  According to the actions, updmap might write to one of the given files
 
2092
  or create a new updmap.cfg, described further below.
 
2093
 
 
2094
  Where changes are saved: if config files are given on the command
 
2095
  line, then the first one given will be used to save any changes from
 
2096
  --setoption, --enable or --disable.  If the config files are taken
 
2097
  from kpsewhich output, then the algorithm is more complex:
 
2098
 
 
2099
    1) If \$TEXMFCONFIG/web2c/updmap.cfg or \$TEXMFHOME/web2c/updmap.cfg
 
2100
    appears in the list of used files, then the one listed first by
 
2101
    kpsewhich --all (equivalently, the one returned by kpsewhich
 
2102
    updmap.cfg), is used.
 
2103
      
 
2104
    2) If neither of the above two are present and changes are made, a
 
2105
    new config file is created in \$TEXMFCONFIG/web2c/updmap.cfg.
 
2106
 
 
2107
  Resolving multiple definitions of a font:
 
2108
    If a font is defined in more than one map file, then the definition
 
2109
    coming from the first-listed updmap.cfg is used.  If a font is
 
2110
    defined multiple times within the same map file, one is chosen
 
2111
    arbitrarily.  In both cases a warning is issued.
 
2112
 
 
2113
  Disabling maps:
 
2114
    updmap.cfg files with higher priority (listed earlier) can disable
 
2115
    maps mentioned in lower priority (listed later) updmap.cfg files by
 
2116
    writing, e.g.,
2016
2117
      \#! Map mapname.map
2017
2118
    or
2018
2119
      \#! MixedMap mapname.map
2019
 
    into the higher prioprity updmap.cfg file. 
 
2120
    in the higher-priority updmap.cfg file. 
2020
2121
 
2021
 
    As an example take a user with a copy of the commercial MTPRO fonts.
2022
 
    He wants to disable the belleek version of the fonts, that is
2023
 
    disable the map belleek.map. The user should create a updmap.cfg file
2024
 
    in \$TEXMFCONFIG/web2c/updmap.cfg with the content
 
2122
    As an example, suppose you have a copy of MathTime Pro fonts
 
2123
    and want to disable the Belleek version of the fonts; that is,
 
2124
    disable the map belleek.map.  You can create the file
 
2125
    \$TEXMFCONFIG/web2c/updmap.cfg with the content
2025
2126
      #! Map belleek.map
2026
2127
      Map mt-plus.map
2027
2128
      Map mt-yy.map
2034
2135
  The log file is written to TEXMFVAR/web2c/updmap.log.
2035
2136
 
2036
2137
  When updmap-sys is run, TEXMFSYSCONFIG and TEXMFSYSVAR are used
2037
 
  instead.  This is the only difference between updmap-sys and updmap.
 
2138
  instead of TEXMFCONFIG and TEXMFVAR, respectively.  This is the only
 
2139
  difference between updmap-sys and updmap.
2038
2140
 
2039
 
  Other locations can be used if overridden on the command line, or these
2040
 
  trees don't exist, or you are not using the original TeX Live.
 
2141
  Other locations may be used if you give them on the command line, or
 
2142
  these trees don't exist, or you are not using the original TeX Live.
2041
2143
 
2042
2144
  To see the precise locations of the various files that
2043
 
  will be read and written, give the -n option (or read the man page).
 
2145
  will be read and written, give the -n option (or read the source).
2044
2146
 
2045
2147
For step-by-step instructions on making new fonts known to TeX, read
2046
2148
http://tug.org/fonts/fontinstall.html.  For even more terse