[comp.lang.postscript] Unix Fonts

orthlieb@adobe.COM (Carl Orthlieb) (03/21/91)

There have been some questions on the net lately about Adobe's policy for
fonts on Unix platforms.  I talked to our marketing folks and hopefully we
can shed some light on our direction in the Unix market.

NeXT
----
At the time that Adobe Illustrator for NeXT ships (end of May) we also plan 
to have the entire Adobe Font Library available for NeXT users.  We will 
manage this in several  stages. The first priority is to get the Adobe Plus 
Pack onto 1.44Mb floppies, followed by the traditional Adobe Type Sets 1,2, 
& 3, on floppies.  We will then make available the entire folio on CD for 
those users (services bureaus, etc.) who want to buy the entire library.  
At the same time as the CD we hope to have all the fonts in the the entire 
Adobe Library available  by individual order directly through Adobe and 
possibly through some of our distributors.  This latter step involves a 
customer calling our 800 number, ordering the specific family(ies) and 
Adobe producing them on an as ordered basis.  Once we know what the popular 
families are outside of the Plus Pack and Type Sets we will inventory them.  
Again, this is late May we're talking about but if everything goes right the  
Adobe/NeXT font situation will be completely resolved by then.  Also note 
that eventually we hope to go to the Type On Call approach.   

As for people who have bought the fonts on a Mac or PC we will work out some 
type of reasonable licensing exchange fee so they are not paying for the 
fonts all over again.

And regarding the MultiMaster technology, Adobe will bring that to the NeXT 
platform but our first priority is to get the above straightened out.

DEC 
---
DEC has just licensed the entire Font Library from Adobe and will be 
distributing it through their channels.

Carl 8-)

<SMITHM@QUCDN.QueensU.CA> (03/21/91)

Carl Ortholieb:

Thanks for your submission.  When I called your company to order Optima
for Unix I was surprised that the answer was it wasn't available.  I'm
not complaining about the way I was handled by Adobe's representative.
He was friendly and sympathetic and seemed a little disappointed himself
about the current state of affairs.

This is probably not your responsibility, but a number of people told
me that the following strategy works just dandy:

   1. Order the Dos format of the fonts.
   2. Run a "simple" program to convert the pfb files for Unix.

I received two copies of the pfb conversion utility.  I'm planning
to test one of these out (thankyou Dick Dunn) today.  Anyway, confidence
is high that this will work and maybe in the short run, the above strategy
could be recommended to other people in my situation.  Perhaps Dick's
utility could even be placed on the Adobe file server?

 Mike Smith                                  SMITHM@QUCDN.BITNET
 Queen's University                          Michael.D.Smith@QueensU.CA
 Computing and Communications Services       (613) 545-2024

mikec@wam.umd.edu (Michael D. Callaghan) (03/21/91)

In article <12982@adobe.UUCP> orthlieb@adobe.COM (Carl Orthlieb) writes:
>There have been some questions on the net lately about Adobe's policy for
>fonts on Unix platforms.  I talked to our marketing folks and hopefully we
>can shed some light on our direction in the Unix market.
>
>NeXT
>----
>[stuff deleted]
>
>As for people who have bought the fonts on a Mac or PC we will work out some 
>type of reasonable licensing exchange fee so they are not paying for the 
>fonts all over again.
>
>[more stuff deleted]

I have simply been purchasing the Mac verision of the fonts, and transferring
them to my NeXT using mfrc from sonata. NOTE: I have no Macintosh! I use the
Mac II's here at school to upload the font to a VAX, and then ftp from the
VAX to a campus Cube. Then I dump the font onto an Optical, and take it home.
The only problem is the lack of screen fonts. Even so, the fonts look pretty
decent.

How does Adobe feel about this practice?




-- 
MikeC
_________________________________________________________
Michael D. Callaghan, MDC Designs, University of Maryland
mikec@wam.umd.edu

rcd@ico.isc.com (Dick Dunn) (03/23/91)

<SMITHM@QUCDN.QueensU.CA> writes:
> I received two copies of the pfb conversion utility.  I'm planning
> to test one of these out (thankyou Dick Dunn) today.  Anyway, confidence
> is high that this will work and maybe in the short run, the above strategy
> could be recommended to other people in my situation.  Perhaps Dick's
> utility could even be placed on the Adobe file server?

Gack!  No, perhaps someone should clean up Dick's wretched little piece of
hackery (and maybe even test it a little better?:-) before putting it any-
place public.

What I wrote has the approximate status of "I tossed this together in a few
minutes one evening to solve a problem; I think it works but mind y'don't
hurt y'self."
-- 
Dick Dunn     rcd@ico.isc.com -or- ico!rcd       Boulder, CO   (303)449-2870
   The Official Colorado State Vegetable is now the "state legislator".

jos@bull.nl (Jos Vos) (03/28/91)

In article <91080.111931SMITHM@QUCDN.QueensU.CA> SMITHM@QUCDN.QueensU.CA writes:

>This is probably not your responsibility, but a number of people told
>me that the following strategy works just dandy:
>   1. Order the Dos format of the fonts.
>   2. Run a "simple" program to convert the pfb files for Unix.

Here's the unfont.c program for converting .pfb files to PostScript.
It was posted a long time ago on Usenet (not by myself).
The patch (unfont.patch) I made myself, and is necessary to generate
a PostScript file with a lines of a reasonable length.
The file preload.ps should be sent to the printer in the same job as
the PostScript font in order to load the font permanently.

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	unfont.c
#	unfont.patch
#	proload.ps
# This archive created: Thu Mar 28 10:42:30 1991
# By:	Jos Vos ()
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'unfont.c'
then
	echo shar: "will not over-write existing file 'unfont.c'"
else
cat << \SHAR_EOF > 'unfont.c'
/*
 * NOTICE
 *
 * Copyright 1988, 1989 by h-three Systems Corporation.
 *
 * Permission is hereby granted for this software's free reproduction
 * and modification for non-commercial purposes, provided that this
 * notice is retained. Commercial enterprises may give away copies
 * as part of their products provided that they do so without charge,
 * that they retain this notice, and that they acknowledge the source
 * of the software.
 *
 *	PostScript is a registered trademark of Adobe Systems Incorporated.
 *	IBM is a registered trademark of International Business Machines
 *	  Corporation.
 *
 *	h-three Systems Corporation
 *	100 Park Drive Suite 204/ P.O. Box 12557
 *	Research Triangle Park, NC  27709
 */

#ifdef NOWHAT
static char *sccsid = "%W% - %E%";
#endif

/*
 * unfont.c
 *
 * usage: unfont [ -v ] [ files ]
 *	-v 	Prints execution information on the standard error.
 *
 * Unpacks IBM PC-format PostScript fonts into a downloadable form.
 *
 */

char *USAGE = "\
usage: unfont [ -? ] [ -v ]  [files ]\n\
	-?	Prints this message.\n\
	-v 	Prints execution information on the standard error.\n\
";

#include <stdio.h>
#include <fcntl.h>
#include <ctype.h>
#include <varargs.h>

#define OK	0
#define FAILURE (-1)
#define Failed(x)	((x) == FAILURE)
#define TRUE	1
#define FALSE	0
typedef char bool;
#define STREQ(a,b)	(strcmp(a,b) == 0)

FILE *fp;

/*
 * used to convert nibbles (n0 is least sig) to ascii-hex
 */

#define N0(c)	    hexbyt[((c) & 0x000f)]
#define N1(c)	    N0((c) >> 4)

char hexbyt[] = "0123456789ABCDEF";

/*
 * vars controlled by command line options
 */

bool verbose = FALSE;			/* be verbose */

extern char *optarg;			/* getopt(3) control vars */
extern int optind;
extern int errno;

char *infile;

char *progname;				/* for error() */

char *strchr(), *strrchr();
long stol(), getparm();

int mygetc();
void dounfont();
long getcount();
void bintohex();

main(argc, argv)
int argc;
char **argv;
{
    register int c;
    bool showusage = FALSE;			/* usage error? */

    /*
     * figure out invocation leaf-name
     */

    if ((progname = strrchr(argv[0], '/')) == (char *) NULL)
	progname = argv[0];
    else
	progname++;

    argv[0] = progname;				/* for getopt err reporting */

    /*
     *	Check options and arguments.
     */

    progname = argv[0];
    while ((c = getopt(argc, argv, "v")) != EOF)
	switch (c)
	{
	    case 'v':				/* toggle verbose */
		verbose = ! verbose;
		break;

	    case '?':
		showusage = TRUE;
	}

    if (showusage)
    {
	(void) fprintf(stderr, "%s", USAGE);
	exit(1);
    }

/* unfont stuff		*/

    if (argv[optind])
    {
        for ( ; argv[optind]; optind++)
	{
	    if (!(fp = fopen(argv[optind], "r"))) {
		error(0, "can't open input file '%s'", argv[optind]);	
		continue;
	    }

	    infile = argv[optind];
	    dounfont();
	    close(fp);
	}
    }
    else
    {
	infile = "<stdin>";
	fp = stdin;
        dounfont();
    }
    exit(0);
}

long getcount();

void 
dounfont()
{
    register int c; 
    register int ch;
             long count;
    register int i;

    for (;;)
    {
	if ((c = mygetc()) != 0x80) {
		error(0, "not a proper font data segment '%s'", infile);
		error(0, "foobar char is 0x%x", c);
		exit(1);
	}
	c = mygetc();
	switch (c) {
	case 1:		
		/* get count, output count bytes to stdout	*/
		count = getcount();
		if (verbose)
		    fprintf(stderr, "case1 count is %ld\n", count);
		for (i=0; i<count; i++)
    			putchar(mygetc());
		break;
	case 2:		
		/* get count, convert count bytes to hex, output	*/
		/* to stdout						*/
		count = getcount();
		if (verbose)
		    fprintf(stderr, "case2 count is %ld\n", count);
		bintohex(count);
		break;
	case 3:		
		/* reached EOF; next file, please 			*/
		if (verbose)
		    fprintf(stderr, "logical eof encountered\n");
		return;

	default:
		error(0, "not a valid segment type '%s'", infile);	
		return;
	}
    }
}

/* 
 * getc for error-checking	
 */

int
mygetc()
{
	int ch;
    	if ((ch = getc(fp)) == -1) {
	    error(-1, "unexpected eof on input in '%s'", infile);
	    exit(1);
	}
    	return(ch);
}

/*
 * get count of bytes from segment header
 */

long
getcount()
{
	int i;
	long count = 0;

    	for (i=0; i<4; i++)
       		count += ((long) mygetc()) << (i * 8);
	return(count);
}

/* 
 * convert binary to ASCII hex and write it to stdout
 */

void
bintohex(count)
long count;
{
	int ch;
	long i;

	for (i=0; i<count; i++) {
	        if ((i % 30) == 0)
		    putchar('\n');
   		ch = mygetc();
    		putchar(N1(ch));
    		putchar(N0(ch));
	}
}

/* end of unfont stuff

/*
 * error(errn, arglist)
 *	report an error to stderr using printf(3) conventions.
 *	Any output is preceded by '<progname>: '
 *	If 'errn' is non-zero, it is assumed to be an 'errno' and its
 *	associated error message is appended to the output.
 */

/*VARARGS*/
error(errn, va_alist)
int errn;
va_dcl
{
    va_list arglist;
    register char *format;
    extern char *sys_errlist[];
    extern int sys_nerr;
    extern int errno;

    if (errn == -1)			    /* use errno if -1 */
	errn = errno;

    va_start(arglist);
    format = va_arg(arglist, char *);
    (void) fprintf(stderr, "%s: ", progname);
    (void) vfprintf(stderr, format, arglist);
    va_end(arglist);

    if (errn)
	if ((errn > 0) && (errn <= sys_nerr))
	    (void) fprintf(stderr, " (%s)\n", sys_errlist[errn]);
	else
	    (void) fprintf(stderr, " (unknown errno=%d)\n", errn);
    else
	(void) fprintf(stderr, "\n");
}
SHAR_EOF
fi
if test -f 'unfont.patch'
then
	echo shar: "will not over-write existing file 'unfont.patch'"
else
cat << \SHAR_EOF > 'unfont.patch'
*** unfont.c-	Thu Jan 12 11:34:25 1989
--- unfont.c	Fri Apr 27 06:55:48 1990
***************
*** 174,181 ****
  		count = getcount();
  		if (verbose)
  		    fprintf(stderr, "case1 count is %ld\n", count);
! 		for (i=0; i<count; i++)
!     			putchar(mygetc());
  		break;
  	case 2:		
  		/* get count, convert count bytes to hex, output	*/
--- 174,183 ----
  		count = getcount();
  		if (verbose)
  		    fprintf(stderr, "case1 count is %ld\n", count);
! 		for (i=0; i<count; i++) {
! 			c = mygetc();
!     			putchar(c == '\r' ? '\n' : c);
! 		}
  		break;
  	case 2:		
  		/* get count, convert count bytes to hex, output	*/
SHAR_EOF
fi
if test -f 'proload.ps'
then
	echo shar: "will not over-write existing file 'proload.ps'"
else
cat << \SHAR_EOF > 'proload.ps'
%!
0 serverdict begin exitserver
% (%stdin) (r) file cvx exec
SHAR_EOF
fi
exit 0
#	End of shell archive

-- 
--    Jos Vos <jos@bull.nl>    (UUCP: ...!{uunet,mcsun,hp4nl}!nlbull!jos)
--    Bull Nederland NV, Product Support Unix, Amsterdam, The Netherlands