diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-09 22:53:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-09 22:53:27 +0000 |
commit | f558d849c4e829dd5c551b6a9e25c863f545a32c (patch) | |
tree | 80ae6d7960216caffc58ac2519dd1f46499954e3 /Master/texmf/scripts | |
parent | 67db54aa1c5ee5016d3ecadb1b436cc1b8d41d33 (diff) |
updmap.pl update
git-svn-id: svn://tug.org/texlive/trunk@4928 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rw-r--r-- | Master/texmf/scripts/tetex/updmap.pl | 57 |
1 files changed, 46 insertions, 11 deletions
diff --git a/Master/texmf/scripts/tetex/updmap.pl b/Master/texmf/scripts/tetex/updmap.pl index ef227926cbc..e3b9e9b0139 100644 --- a/Master/texmf/scripts/tetex/updmap.pl +++ b/Master/texmf/scripts/tetex/updmap.pl @@ -222,6 +222,23 @@ my @fileADOBE = ( 's/\buzdr.pfb\b/zd______.pfb/x' ); +my %base14RemovePSName = ( + '/^[^\s]*\sCourier\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sCourier-Bold\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sCourier-Oblique\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sCourier-BoldOblique\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sHelvetica\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sHelvetica-Bold\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sHelvetica-Oblique\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sHelvetica-BoldOblique\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sSymbol\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sTimes-Roman\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sTimes-Bold\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sTimes-Italic\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sTimes-BoldItalic\s/' => 's/\s[^\s]*//', + '/^[^\s]*\sZapfDingbats\s/' => 's/\s[^\s]*//' +); + &main; exit 0; @@ -354,7 +371,7 @@ sub help { print " --edit edit updmap.cfg file\n"; print " --help show this message\n"; print " --showoptions item show alternatives for options\n"; - print " --setoption option=value set option where option is one\n"; + print " --setoption option value set option where option is one\n"; print " of dvipsPreferOutline, LW35, dvipsDownloadBase35\n"; print " or pdftexDownloadBase14\n"; print " --enable maptype=mapfile add or enable a Map or MixedMap\n"; @@ -461,6 +478,14 @@ sub transLW35 { return @lines; } +sub base14RemovePSName { + my @lines = @_; + foreach my $r (keys %base14RemovePSName) { + map { eval $base14RemovePSName{$r} if (eval($r)) ; } @lines; + } + return @lines; +} + ############################################################################### # locateWeb2c (file ...) # apply kpsewhich with format 'web2c files' @@ -828,13 +853,11 @@ sub normalizeLines { my @lines = @_; my %count = (); - @lines = grep { $_ !~ m/^[*#;%]/ } @lines; + @lines = grep { $_ !~ m/^%/ } @lines; map {$_ =~ s/\s+/ /gx } @lines; @lines = grep { $_ !~ m/^\s*$/x } @lines; map { $_ =~ s/\s$//x ; - $_ =~ s/\s*\"\s*/ \" /gx; - $_ =~ s/\" ([^\"]*) \"/\"\1\"/gx; - } @lines; + $_ =~ s/\s*\"\s*/ \" /gx } @lines; @lines = grep {++$count{$_} < 2 } (sort @lines); @@ -888,19 +911,19 @@ sub dvips2dvipdfm { sub mkMaps { $mode = &cfgval("LW35"); - $mode = "URWkb" if ($mode = undef); + $mode = "URWkb" if ! $mode; $dvipsPreferOutline = &cfgval("dvipsPreferOutline"); - $dvipsPreferOutline = 1 if ($dvipsPreferOutline eq undef); + $dvipsPreferOutline = 1 if ! $dvipsPreferOutline; $dvipsDownloadBase35 = &cfgval("dvipsDownloadBase35"); - $dvipsDownloadBase35 = 0 if ($dvipsDownloadBase35 eq undef); + $dvipsDownloadBase35 = 0 if ! $dvipsDownloadBase35; $pdftexDownloadBase14 = &cfgval("pdftexDownloadBase14"); - $pdftexDownloadBase14 = 0 if ($pdftexDownloadBase14 eq undef); + $pdftexDownloadBase14 = 0 if ! $pdftexDownloadBase14; $dvipdfmDownloadBase14 = &cfgval("dvipdfmDownloadBase14"); - $dvipdfmDownloadBase14 = 0 if ($dvipdfmDownloadBase14 eq undef); + $dvipdfmDownloadBase14 = 0 if ! $dvipdfmDownloadBase14; if (! $quiet) { print "\ @@ -983,12 +1006,24 @@ updmap is creating new map files using the following configuration:\ push @tmp7, &getLines(@tmp2); @tmp7 = grep { $_ !~ m/(^%|PaintType)/ } @tmp7; + # remove PS-Fontname from ExtendFont / SlantFont lines (works around a + # pdftex bug) my @pdftex_ndl14_map = @tmp3; + map { + if (m/\".*\b(Slant|Extend)Font\b.*\"/x) { + $_ =~ s/\s[^\s]*//; + } + } @pdftex_ndl14_map; @pdftex_ndl14_map = &normalizeLines(@pdftex_ndl14_map); &writeLines(">$pdftexoutputdir/pdftex_ndl14.map", @pdftex_ndl14_map); my @pdftex_dl14_map = @tmp7; - @pdftex_dl14_map = &normalizeLines(@pdftex_dl14_map); + map { + if (m/\".*\b(Slant|Extend)Font\b.*\"/x) { + $_ =~ s/\s[^\s]*//; + } + } @pdftex_dl14_map; + @pdftex_dl14_map = &normalizeLines(&base14RemovePSName(@pdftex_dl14_map)); &writeLines(">$pdftexoutputdir/pdftex_dl14.map", @pdftex_dl14_map); my @dvipdfm_dl14_map = @tmp7; |