summaryrefslogtreecommitdiff
path: root/fonts/utilities/fontload/unix/mkmap
blob: b012e4e3462d5e51736f5fde253948ee4e200bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/csh
#
# This script is used to create map of the files available in 
# specified tree ...
#
if ( "$1" != "-focus" ) then
   # Temorarie, but normally this program is in path...
   setenv SUBFONT `pwd`/subfont

   set root=$1
   if ( "$1" == "" ) then
      set root="/usr/local/lib/texmf/fonts"
   endif
   set CWD=`pwd`
   if ( -e $CWD/mkmap ) then
      set itself=$CWD/mkmap
   else
      echo Can not found itself when try search in cuurent directory.
      exit
   endif
   echo >SubFont.map
   echo >Fontmap.t1
   cd root
   find . -name "*.pf[ab]" -exec $itself -focus {} $CWD/Fontmap.t1 $CWD/SubFont.map \;
else
   set fn=$2
   set gsmap=$3
   set sfmap=$4
   set font=`$SUBFONT $fn | grep /FontName | cut -d/ -f3 | cut '-d ' -f1`
   echo font /$font/ in file /$fn/
   echo "$font $fn" >>$sfmap
   echo "/$font ($fn) ;" >>$gsmap
endif
####