home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEPLOY / USER.Z / truetype_font_install.sh < prev    next >
Text File  |  1996-09-09  |  1KB  |  55 lines

  1. #
  2. # NAME:
  3. #
  4. #       truetype_font_install installs all the TrueType fonts
  5. #
  6. # SYNOPSIS:    
  7. #
  8. #    truetype_font_install source_directory destination_directory
  9. #
  10. #
  11. # DESCRIPTION:
  12. #
  13. #    truetype_font_install is a Bourne shell script used to 
  14. #    convert all the .ttf font files in the specified source directory 
  15. #    and places the resultant .font files in the destination directory
  16. #
  17. #  EXAMPLES:
  18. #
  19. #    For Window NT 3.5 
  20. #
  21. #    >truetype_font_install $(windir)/system
  22. #            $(NEXT_ROOT)/usr/NextLibrary/Fonts
  23. #
  24. #    For Window NT 4.0
  25. #
  26. #    >truetype_font_install $(windir)/Fonts 
  27. #            $(NEXT_ROOT)/usr/NextLibrary/Fonts
  28. #
  29. case $# in
  30.     2 )
  31.         echo "truetype_font_install : installing fonts from" $1;;
  32.     * )
  33.         echo "truetype_font_install : usage";
  34.         echo "      truetype_font_install source_directory destination_directory";;
  35. esac
  36.  
  37. if test ! -d $1
  38. then
  39.     echo "truetype_font_install : invalid source directory" $1
  40.     exit 1
  41. fi
  42. if test ! -d $2
  43. then
  44.     echo "truetype_font_install : invalid destination directory" $2
  45.     exit 1
  46. fi
  47.  
  48. for file in $1/*.ttf $1/*.TTF
  49. do
  50.     if test -f $file
  51.     then
  52.         ttf2font -o $2 -q $file
  53.     fi
  54. done
  55.