Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!boring.cray.com!hrp From: hrp@boring.cray.com (Hal Peterson) Newsgroups: gnu.ghostscript.bug Subject: user fonts Message-ID: <8908091722.AA08431@rothko.cray.com> Date: 9 Aug 89 17:22:18 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 37 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. */