[gs-cvs] rev 7478 - in trunk/gs: doc lib

alexcher at ghostscript.com alexcher at ghostscript.com
Fri Dec 8 22:17:35 PST 2006


Author: alexcher
Date: 2006-12-08 22:17:34 -0800 (Fri, 08 Dec 2006)
New Revision: 7478

Modified:
   trunk/gs/doc/pscet_status.txt
   trunk/gs/lib/gs_res.ps
Log:
Following PLRM 3 handle instances of CIDFont resource in findfont, 
definefont and undefinefont. Partly fix CET 32_all, 33_all, 34_all, 25_all.

DIFFERENCES:
None


Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt	2006-12-09 05:04:05 UTC (rev 7477)
+++ trunk/gs/doc/pscet_status.txt	2006-12-09 06:17:34 UTC (rev 7478)
@@ -5194,12 +5194,8 @@
 
 32_all-16 OK
 
-32_all-2  DIFF	"<key> <cidfont> definefont <cidfont>" is required by PLRM but fails with GS.
-		Igor assigns this to Alex.
-		Check for /CIDFontType presents and dispatch to /CIDFont defineresource.
-		Note : the /Font resource category is being redefined multiple times.
-		IMO this change should go to 'definefont' operator,
-		which also is being redefined at once at least.
+32_all-2  OK	Fixed in rev. 7478. findfont, definefont, undefinefont also
+		handle /CIDFont resource instances now. - Alex
 
 32_all-3  OK	
 
@@ -5217,7 +5213,7 @@
 
 33_all-1  DIFF	CIDFont dictionary key OrigFont is present in CPSI and not in GS. assign: Igor
 
-33_all-2  DIFF	CIDFontName differs. assign: Igor
+33_all-2  OK  	Fixed in rev. 7478. See 32_all-2. - Alex 
 
 33_all-3  OK	Minor differences visually reviewed by RJJ
 
@@ -5233,7 +5229,7 @@
 
 34_all-1  DIFF	CPSI has OrigFont, PaintType in a CID font dictionary. Assign: Ray
 
-34_all-2  DIFF	(/key CIDFont definefont) not conforming. Analyzed by Igor. assign: Igor.
+34_all-2  OK  	Fixed in rev. 7478. See 32_all-2. - Alex 
 
 34_all-3  OK	Minor differences visually reviewed by RJJ
 
@@ -5255,7 +5251,7 @@
 
 35_all-12  DIFF	glyphshow : Different error reporting. Analyzed by Igor. assign: Alex.
 
-35_all-2  DIFF	Same as 34_all-2. Analyzed by Igor. Assign: Igor.
+35_all-2  OK  	Fixed in rev. 7478. See 32_all-2. - Alex 
 
 35_all-3  OK	Minor differences visually reviewed by RJJ
 

Modified: trunk/gs/lib/gs_res.ps
===================================================================
--- trunk/gs/lib/gs_res.ps	2006-12-09 05:04:05 UTC (rev 7477)
+++ trunk/gs/lib/gs_res.ps	2006-12-09 06:17:34 UTC (rev 7478)
@@ -1011,18 +1011,35 @@
   /.origfindfont /findfont load def
 end
 /definefont {
-  { /Font defineresource } stopped {
-      /definefont cvx $error /errorname get signalerror
+  { 1 index pop    % Unlike other operators, check the stack depth first.
+    dup /CIDFontType known { /CIDFont } { /Font } ifelse
+    defineresource
+  } stopped {
+    /definefont cvx $error /errorname get signalerror
   } if
 } bind odef
 /undefinefont {
-  /Font undefineresource
+  { dup /Font resourcestatus {
+       pop pop /Font
+    } {
+       dup /CIDFont resourcestatus { pop pop /CIDFont } { /Font } ifelse
+    } ifelse
+    undefineresource
+  } stopped {
+    /undefinefont $error /errorname get signalerror
+  } if
 } bind odef
 % The Red Book requires that findfont be a procedure, not an operator,
 % but it still needs to restore the stacks reliably if it fails.
 /.findfontop {
-  { /Font findresource } stopped {
-    pop /findfont $error /errorname get signalerror
+  { dup /Font resourcestatus {
+      pop pop /Font
+    } {
+      dup /CIDFont resourcestatus { pop pop /CIDFont } { /Font } ifelse
+    } ifelse
+    findresource
+  } stopped {
+    /findfont $error /errorname get signalerror
   } if
 } bind odef
 /findfont {



More information about the gs-cvs mailing list