[gnu.ghostscript.bug] user fonts

hrp@boring.cray.com (Hal Peterson) (08/10/89)

When using user-defined fonts, the characters all appeared on top of
one another in the wrong place.  After only a couple of hours of work,
nrh@bellcore.com fixed the problem; his patch is below.  Ghostscript
now correctly renders a number of files using user-defined fonts,
including (GET THIS ONE) a TeX document postprocessed by dvitps.
Thanks, Nathaniel.

--
Hal Peterson			Domain:  hrp@cray.com
Cray Research			Old style:  hrp%cray.com@uc.msc.umn.edu
1440 Northland Dr.		UUCP:  uunet!cray!hrp
Mendota Hts, MN  55120  USA	Telephone:  +1 612 681 3145

========================================================================
*** gschar-DIST.c	Tue Aug  8 22:34:28 1989
--- gschar.c	Wed Aug  9 00:13:32 1989
***************
*** 436,441 ****
--- 436,442 ----
  	cached_fm_pair *pair = 0;
  	byte chr;
  	int code;
+ 	gs_point psave;
  more:	/* Proceed to next character */
  	index = penum->index;
  	chr = str[index];
***************
*** 474,479 ****
--- 475,482 ----
  	/* Character is not cached, client must render it. */
  	if ( (code = gs_gsave(pgs)) < 0 ) return code;
  	gs_setmatrix(pgs, &pgs->char_tm);
+ 	gs_currentpoint(pgs, &psave); /* nrh: */
+ 	gs_translate(pgs, (floatp) psave.x, (floatp) psave.y); /* nrh: make 0 0 origin of where current char is drawn  */ 
  	penum->width_set = sws_none;
  	penum->continue_proc = continue_show_update;
  	/* Try using the build procedure in the font. */

ghost@aladdin.com (L. Peter Deutsch) (08/11/89)

Thanks for submitting this bug fix.  Hitoshi Aida sent in a similar
one.  A fix equivalent to this will be in release 1.4.

L. Peter Deutsch			ghost@aladdin.com
Aladdin Enterprises			...{uunet,parcplace}!aladdin!ghost
P. O. box 60264, Palo Alto, CA 94306