[comp.windows.x] fix to font cacheing in ralpage postscript viewer

juha@tds.kth.se (Juha Sarlin) (09/13/90)

In article <1990Aug21.002853.14831@sics.se>, jw@sics.se (Johan Widen) writes:
jw> It turned out that there was a problem with user defined fonts, at least
jw> they did not work for me. I "fixed" the problem by turning off the caching
jw> of the user defined fonts (in ShowUser() in font.c).

The error seems to be in the postscript function loaddiskcache.
When a font is missing both OriginalName and FontName a temporary
function 'name' doesn't become defined, but it is used anyway.

Here is my fix and also a patch to re-enable cacheing in font.c:

*** /tmp/,RCSt1a01663	Thu Sep 13 14:48:53 1990
--- ralpage/disk-cache	Thu Sep 13 14:46:51 1990
***************
*** 54,60 ****
  				} ifelse
  			} ifelse def
- 		} if
  			
! 		CacheDirectory name known
  				ry 0 eq and
  				bx 0 eq and {
--- 54,59 ----
  				} ifelse
  			} ifelse def
  			
! 		    CacheDirectory name known
  				ry 0 eq and
  				bx 0 eq and {
***************
*** 72,75 ****
--- 71,75 ----
  				} { pop pop pop } ifelse
  			} { pop pop pop } ifelse
+ 		    } if
  		} if
  	end

*** /tmp/,RCSt1a03377	Thu Sep 13 14:50:47 1990
--- source/font.c	Thu Sep 13 14:46:05 1990
***************
*** 540,545 ****
  	if (!FindCache ())
  	 {
! /* This does not seem to work. A (possibly small) bug somewhere. */
! /*	 	VOID Push (ExecStack, AWidthShowName);
  		VOID Push (OpStack, MakeReal (shim.hx));
  		VOID Push (OpStack, MakeReal (shim.hy));
--- 540,544 ----
  	if (!FindCache ())
  	 {
! 	 	VOID Push (ExecStack, AWidthShowName);
  		VOID Push (OpStack, MakeReal (shim.hx));
  		VOID Push (OpStack, MakeReal (shim.hy));
***************
*** 551,555 ****
  		VOID Push (ExecStack, OpShowStop);
  		PStopped (LoadDiskCacheName);
! 	 	return TRUE; */
  	 }
  	
--- 550,554 ----
  		VOID Push (ExecStack, OpShowStop);
  		PStopped (LoadDiskCacheName);
! 	 	return TRUE;
  	 }
  	
--
Juha Sarlin   juha@tds.kth.se

grunwald@foobar.colorado.edu (Dirk Grunwald) (09/14/90)

how does 'ralpage' compare to ghostscript 2.0 (available on prep.ai.mit.edu).

also, is anyone who has ghostscript 2.0 planning on making a
ghostscript interpreter widget?


Dirk Grunwald -- Univ. of Colorado at Boulder	(grunwald@foobar.colorado.edu)
						(grunwald@boulder.colorado.edu)

jw@sics.se (Johan Widen) (09/14/90)

>>>>> In article <JUHA.90Sep13152309@octopus.tds.kth.se>, juha@tds.kth.se (Juha Sarlin) writes:

juha> In article <1990Aug21.002853.14831@sics.se>, jw@sics.se (Johan Widen) writes:
jw> It turned out that there was a problem with user defined fonts, at least
jw> they did not work for me. I "fixed" the problem by turning off the caching
jw> of the user defined fonts (in ShowUser() in font.c).

juha> The error seems to be in the postscript function loaddiskcache.
juha> When a font is missing both OriginalName and FontName a temporary
juha> function 'name' doesn't become defined, but it is used anyway.

I have now made a number of fixes to ralpage, and have also integrated some
considerable improvements from other people.

Two fairly severe bugs remain to be fixed (1: positioning of X Window fonts is
sometimes very bad. 2: there is something that looks like a rounding error in
the stroke operator, lines are sometimes displayed much thinner than they
are supposed to be), but I hope to be able to deal with them within a few days.
After that I will clean up, write a little installation documentation and make
a new release available.

Two things that will not be supported in the next release:
	Adobe type 1 fonts

	Postscript files produced on Macintosh

Fixes for these problems are solicited. (They are not bugs, just a lack of
features.)

I also plan to make an alpha release available within a couple of days. This
will lack fixes for the two severe bugs I mentioned above.

--
Johan Widen
SICS, PO Box 1263, S-164 28 KISTA, SWEDEN	Internet: jw@sics.se
Tel: +46 8 752 15 32	Ttx: 812 61 54 SICS S	Fax: +46 8 751 72 30