The following patch does 3 things:

1) Add some more foundries. This covers the FontSite 500 CD, and most of
the foundries used by .pfb files for LaTeX. Now also the Lucida fonts from Y&Y.

2) Changed the all-fonts samples printing to make better use of paper.
Makes a difference when dealing with 500 fonts...

3) Fix the rather daft setting of file permissions

4) Fix some quoting problems with variables in system() calls, which caused the
script to fail.

Volker Kuhlmann, 14 Oct 2002, 11 Feb 2005


--- /usr/bin/type1inst.orig	2004-10-02 14:07:12.000000000 +1200
+++ /usr/bin/type1inst	2005-02-11 10:26:34.000000000 +1300
@@ -56,8 +56,8 @@
 
 # NOTE THAT MY E-MAIL ADDRESS HAS CHANGED (AS OF VERSION 0.6.1) !!!!
 
-$version = "0.6.1";
-$versiondate = "11th February 1998";
+$version = "0.6.1-vk";
+$versiondate = "11th February 1998 (vk 11Feb05)";
 $emailaddress = "james.macnicol\@mailexcite.com";
 $copyright = "Copyright (C) 1996-1998 James Macnicol ($emailaddress)";
 
@@ -110,7 +110,15 @@
 	      "Three Islands Press:3ip",
 	      "Hank Gillette:gillette",
 	      "Doug Miles:miles",
-	      "Richard Mitchell:mitchell");
+	      "Richard Mitchell:mitchell",
+	      "The FontSite:fontsite", "www.fontsite.com:fontsite",
+	      "Sean Cavanaugh:seancavanaugh",
+      	      "Softmaker:softmaker",
+	      "GUST:gust", "Polish TeX Users:gust",
+	      "American Mathematical Society:ams",
+	      "Basil K. Malyshev:bakoma", "BaKoMa:bakoma",
+	      "The Omega Project:omega",
+	      "Y&Y, Inc:yandy");
 
 # Note: Hershey is the public Hershey fonts which come with Ghostscript.
 # These cause no end of problems since they look inside like funny PS
@@ -764,7 +772,7 @@
 	print SCALE "$fontdata{$key}\n";
     }
     close(SCALE);
-    system ("chmod 0755 fonts.scale") && log_msg("Coudln't chmod \"fonts.scale\" ... continuing on anyway\n");
+    system ("chmod 0644 fonts.scale") && log_msg("Coudln't chmod \"fonts.scale\" ... continuing on anyway\n");
 
     log_only_msg(" Done.\n");
 }
@@ -838,7 +846,7 @@
 	print FONTMAP "($key)\t;\n";
     }
     close(FONTMAP);
-    system ("chmod 0755 Fontmap") && log_msg("Couldn't chmod \"Fontmap\" ... continuing on anyway\n");
+    system ("chmod 0644 Fontmap") && log_msg("Couldn't chmod \"Fontmap\" ... continuing on anyway\n");
 
     log_only_msg(" Done.\n");
 }
@@ -946,13 +954,13 @@
     die("Couldn't open samples/$samplefile\n");
     print SAMPLE "$text\n";
     close(SAMPLE);
-    system("chmod 0755 samples/$samplefile") && log_msg("Couldn't chmod individual sample file \"samples/$samplefile\" ... continuing on anyway\n");
+    system("chmod 0644 samples/\"$samplefile\"") && log_msg("Couldn't chmod individual sample file \"samples/$samplefile\" ... continuing on anyway\n");
 
 # For the "allfont.ps" files we use a standard font for the font name so
 # that in the case of non-alpha fonts we still can still read the name of
 # the font (eg symbol or dingbats).
 
-    if ($height == 700) {
+    if ($height == 800) {
 	$allsample = "samples/allfont-$allcount.ps";
 	$allcount = $allcount + 1;
 
@@ -971,7 +979,7 @@
 12 scalefont
 setfont
 newpath
-30 $height moveto
+45 $height moveto
 ($fontname : ) show
 /$fontname findfont 
 20 scalefont        
@@ -981,12 +989,12 @@
 ALLTEXT
 
     print ALLSAMPLE "$alltext\n";
-    $height = $height - 32;
-    if ($height < 100) {
+    $height = $height - 25;
+    if ($height < 25) {
 	print ALLSAMPLE "showpage\n";
 	close(ALLSAMPLE);
-	system("chmod 0755 $allsample") && log_msg("Couldn't chmod all sample sheet \"$allsample\" ... continuing on anyway\n");
-	$height = 700;
+	system("chmod 0644 \"$allsample\"") && log_msg("Couldn't chmod all sample sheet \"$allsample\" ... continuing on anyway\n");
+	$height = 800;
     }
 
     ($height);
@@ -1076,7 +1084,7 @@
 	log_msg("Clearing samples directory\n");
 	system("rm -f samples/*.ps");
     }
-    $height = 700;
+    $height = 800;
     $samplefont = "Helvetica";
     $allcount = 0;
     $allsample = "samples/allfont-$allcount.ps";
@@ -1164,7 +1172,7 @@
 foreach $filename (do_glob("pfb")) {
     if (($dox && (! $fs{$filename})) ||
 	(($dogs || $samples) && (! $fm{$filename}))) {
-	system("pfbtops $filename > foo");
+	system("pfbtops \"$filename\" > foo");
 	($x, $gs) = &process_font("foo");
 	system("rm foo");
 	if ($dox) {
@@ -1187,7 +1195,7 @@
 foreach $filename (do_glob("pfa.gz")) {
     if (($dox && (! $fs{$filename})) ||
 	(($dogs || $samples) && (! $fm{$filename}))) {
-	system("gunzip -c $filename > foo");
+	system("gunzip -c \"$filename\" > foo");
 	($x, $gs) = &process_font("foo");
 	system("rm foo");
 	if ($dox) {
@@ -1210,7 +1218,7 @@
 foreach $filename (do_glob("pfb.gz")) {
     if (($dox && (! $fs{$filename})) ||
 	(($dogs || $samples) && (! $fm{$filename}))) {
-	system("gunzip -c $filename | pfbtops > foo");
+	system("gunzip -c \"$filename\" | pfbtops > foo");
 	($x, $gs) = &process_font("foo");
 	system("rm foo");
 	if ($dox) {
@@ -1249,7 +1257,7 @@
 if ($dox) {
     &write_fonts_scale(%fs);
     system("mkfontdir");      # Generate fonts.dir
-    system("chmod 0755 fonts.dir") && log_msg("Couldn't chmod \"fonts.dir\" ... continuing on anyway\n");
+    system("chmod 0644 fonts.dir") && log_msg("Couldn't chmod \"fonts.dir\" ... continuing on anyway\n");
 }
 if ($dogs) {
     &write_fontmap(%fm);
@@ -1258,10 +1266,10 @@
 # Finish up the all font sample file
 if ($samples) {
     log_only_msg("Finished font sample files\n");
-    if ($height < 700) {
+    if ($height < 800) {
 	print ALLSAMPLE "showpage\n";
 	close(ALLSAMPLE);
-	system("chmod 0755 $allsample") && log_msg("Couldn't chmod \"$allsample\" ... continuing on anyway\n");
+	system("chmod 0644 \"$allsample\"") && log_msg("Couldn't chmod \"$allsample\" ... continuing on anyway\n");
     }
 }
 

