#!/bin/csh # Install # This C-shell will help to install fload tool, # which realizes Partial Downloading of the ATM compatible Type 1 fonts # for some PostScript file. ############################################################################### if ( ! -e INSTALL ) then echo Installation available only from directory with install script. exit endif if ( -e install.dirs ) then source install.dirs else # Directory to put system dependent executable files (subfont program) setenv FBIN /usr/local/bin # Directory to put system independent scripts (fload C-shell script) setenv FSHR /usr/local/bin # Directory for library files (Fontmap, psfstat.ps, SubFont.map, *.FS) setenv FLIB /usr/local/lib/fload # Also Check that all your fonta are in list directory tries setenv FPATH /usr/local/lib/texmf/fonts endif ############################################################################## echo Check environment ... set gsbin=`which gs` if ( ! -e "$gsbin" ) then echo Can not found GhostScript program in path $path exit endif echo Making subfont program first ... pushd ../src make popd if ( ! -e ../src/subfont ) then echo Make failed. exit 1 endif echo Copying SubFont program to $FBIN/subfont cp ../src/subfont $FBIN/subfont if ( ! -e $FBIN/subfont ) then echo Can not copying SubFont program to $FBIN directory. exit endif chmod +x $FBIN/subfont ############## Copying man pages if FMAN environment is on ################### if ( $?FMAN ) then echo Copying man pages subfont.1 and fload.1 into $FMAN directory ... cp ../doc/fload.1 $FMAN cp ../doc/subfont.1 $FMAN endif ############## Making fload C-shell script ################################### set out=$FSHR/fload echo Create $out C-shell script. echo "#\!/bin/csh" >$out if ( ! -e $FSHR/fload ) then echo Can not write fload C-shell script into $FSHR directory. exit endif echo "# Copyright (C) 1994, Basil K. Malyshev. All rights reserved." >>$out echo "# WARNING this script was created automatically." >>$out echo "set lib=$FLIB" >>$out echo "setenv FONTPATH $FPATH" >>$out cat >$out chmod +x $out ############## Create files in library directory ############################# if ( ! -e $FLIB ) then mkdir -p $FLIB else if ( -e $FLIB/Fontmap ) then rm -f $FLIB/Fontmap endif endif echo Copying psfstat.ps PostScript script to $FLIB/psfstat.ps cp ../lib/psfstat.ps $FLIB/psfstat.ps if ( ! -e $FLIB/psfstat.ps ) then echo Can not copying psfstat.ps PostScript script to $FLIB directory. exit endif echo "Copying files ../lib/*.FS to $FLIB directory." cp ../lib/*.FS $FLIB #### Create standard head of the Fontmap file for GhostScript. ### $gsbin -DNODISPLAY -sOUT=$FLIB/Fontmap ../lib/Fontmap.get ### echo "(Fontmap.t1) run" >>$FLIB/Fontmap #### Scan all font directories and add records to Fontmap & SubFont.map #### # Split FPATH variable into elements set pathSave=($path) setenv PATH $FPATH set fpath=($path) set path=($pathSave) # Now go throght all font directories setenv SUBFONT $FBIN/subfont echo >$FLIB/Fontmap.t1 foreach root ($fpath) echo "Scanning $root directory..." echo "%% This part was constructed from $root directory" >>$FLIB/Fontmap.t1 pushd root find . -name "*.pf[ab]" -exec $SUBFONT -z$FLIB/Fontmap.t1 {} \; popd end ### # And creates map for SubFont program ### $gsbin -DNODISPLAY -sINFILE=$FLIB/Fontmap.t1 -sOUTFILE=$FLIB/SubFont.map \ ### ../lib/cvtmap.ps quit.ps echo "==================================================" echo "== Installation have been completed. ==" echo "== Now you can use command: ==" echo "== fload PS-without-fonts >PS-with-fonts ==" echo "== to preload fonts partially into your PS-file ==" echo "==================================================" #### End of installation script ####