home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / lib / transcript / ditroff.font / adddit.sh next >
Text File  |  1997-03-29  |  3KB  |  172 lines

  1.  
  2. # Copyright 1990 (C) Adobe Systems Incorporated.  All rights reserved.
  3. # GOVERNMENT END USERS: See notice of rights in Notice file in release directory.
  4. # PostScript is a registered trademark of Adobe Systems Incorporated
  5. # TranScript is a registered trademark of Adobe Systems Incorporated
  6. # $Header: /disks/hobo/vp6/snichols/rel3.0/transcript/RCS/adddit.sh,v 3.0 1991/06/17 17:02:52 snichols Exp $
  7.  
  8. # Add additional fonts for use by ditroff.  This script requires that 
  9. # builddit.sh has been run at least once to create the Times family.
  10. # This script does not build in place; i.e. the build site used in
  11. # builddit.sh must still exist, since adding a new font for use by ditroff
  12. # involves adding it to all existing font families.  After adddit.sh, you
  13. # should run instldit.sh again to re-install all the font families.
  14.  
  15. # Adddit.sh takes as arguments the name of the font family, the
  16. # two-character names you want to use to access the font in ditroff (in the
  17. # order roman (the "roman" or "regular" version of the font), italic, bold,
  18. # and bold-italic.  If a font family does not have one of these font faces,
  19. # substitute the Times equivalents (TR TI TB TD).  You should also create a
  20. # map file for each of these two-character name, named with the
  21. # two-character name and the extension .map, e.g. PA.map.  This map file
  22. # should contain the "real" name of the font, e.g. Palatino-Roman.  If
  23. # these map files are not located in the $SRCDIR/lib/ditroff.font
  24. # directory, you should specify the directory in which to find them.
  25.  
  26. # adddit.sh familyname Rname Iname Bname BIname [mapdir]
  27.  
  28.  
  29.  
  30. if [ -r ./config ]
  31. then
  32.     . ./config
  33. else 
  34.     echo "config file missing!"
  35.     exit 1
  36. fi
  37.  
  38. SRCDIR=`pwd`
  39. BUILDDIR=`pwd`
  40.  
  41. DESCFONTS="R I B BI H HB C CB S SS"
  42.  
  43. family=$1
  44. r=$2
  45. i=$3
  46. b=$4
  47. bi=$5
  48.  
  49. if [ $# = "6" ]
  50. then
  51.     dir=$6
  52. else
  53.     dir=$SRCDIR
  54. fi
  55.  
  56. if [ $family = "Times" ]
  57. then
  58.     echo "Times can't be added in with this script; must be done at"
  59.     echo "initial installation"
  60.     exit 0
  61. fi
  62.  
  63. #cd ditroff
  64.  
  65. # do Times first, we'll build off of that
  66. echo "Building font in Times family first"
  67. cwd=`pwd`
  68. cd Times/devpsc
  69. timesdir=`pwd`
  70.  
  71.  
  72. if [ $family = "Courier" ]
  73. then
  74.     nolig="-n"
  75. else
  76.     nolig=""
  77. fi
  78. for j in $r $i $b $bi
  79. do
  80.     cp $dir/$j.map .
  81.     realname=`head -1 $j.map`
  82.     afmfilename=`$BUILDDIR/map $realname`
  83.     $BUILDDIR/afmdit -a $afmfilename -o $j \
  84.                          -m $j.map -x $j.aux $nolig
  85.     $MAKEDEV $j
  86.     if [ $j = "C" ]
  87.     then
  88.         ln C CW
  89.         ln C.aux CW.aux
  90.         ln C.map CW.map
  91.         ln C.out CW.out
  92.     fi
  93. done
  94.  
  95. cd $cwd
  96.  
  97. echo "Add to other font families."
  98. for others in `ls`
  99. do
  100.     if [ $others = "Times" ]
  101.     then
  102.         continue
  103.     fi
  104.     if [ $others = $family ]
  105.     then
  106.         continue
  107.     fi
  108.     echo $others
  109.     cd $others/devpsc
  110.     ln $timesdir/$r* .
  111.     ln $timesdir/$i* .
  112.     ln $timesdir/$b* .
  113.     ln $timesdir/$bi* .
  114.     cd $cwd
  115. done
  116.  
  117. echo "Building $family"
  118. rm -rf $family
  119. mkdir $family $family/devpsc
  120. cd $family/devpsc
  121. ln $timesdir/* .
  122. for s in '' .aux .map .out
  123. do
  124.     rm -rf R$s I$s B$s BI$s
  125.     ln $timesdir/$r$s R$s
  126.     ln $timesdir/$i$s I$s
  127.     ln $timesdir/$b$s B$s
  128.     ln $timesdir/$bi$s BI$s
  129. done
  130. for t in R I B BI
  131. do
  132.     mv $t /tmp/fam.$$
  133.     rm $t.out
  134.     sed -e "/^name/s/.*/name $t/" /tmp/fam.$$ > $t
  135. done
  136. rm DESC.out
  137. $MAKEDEV DESC
  138. rm -f /tmp/fam.$$
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.