[gs-cvs] rev 7017 - trunk/gs/lib
dan at ghostscript.com
dan at ghostscript.com
Thu Aug 31 14:56:17 PDT 2006
Author: dan
Date: 2006-08-31 14:56:16 -0700 (Thu, 31 Aug 2006)
New Revision: 7017
Modified:
trunk/gs/lib/gs_fonts.ps
Log:
Fix for 'invalid restore' in CET test file 16-04.ps.
DETAILS:
There are were complications. 1) The procedure .completfont was not properly
signalling an error when it occured. 2) This procedure is used from both
definefont and findfont. We need the error to be indicated as coming from
the appropriate procedure.
The fix for this problem is to fix .completefont to properly report errors
and to add stopped contexts around each of the invocations of .completefont,
loading the errorname from .completefont and calling signalerror again with
the appropriate procedure name.
Modified: trunk/gs/lib/gs_fonts.ps
===================================================================
--- trunk/gs/lib/gs_fonts.ps 2006-08-31 10:34:11 UTC (rev 7016)
+++ trunk/gs/lib/gs_fonts.ps 2006-08-31 21:56:16 UTC (rev 7017)
@@ -475,10 +475,13 @@
/ProvideUnicodeDecoding get exec
} if
readonly % stack: name fontdict
- } stopped { /invalidfont signalerror } if
+ } stopped { /.completefont cvx /invalidfont signalerror } if
} bind odef
/definefont
- { .completefont
+ { % Run .completefont in a stopped context so that we can
+ % indicate that any errors come from definefont.
+ /.completefont load stopped
+ { /definefont cvx $error /errorname get signalerror } if
% If the current allocation mode is global, also enter
% the font in LocalFontDirectory.
.currentglobal
@@ -536,7 +539,11 @@
% Don't bind in definefont, since Level 2 redefines it.
/definefont .systemvar exec
}
- { .completefont pop exch pop
+ { % Run .completefont in a stopped context so that we can
+ % indicate that any errors come from findfont.
+ /.completefont load stopped
+ { /findfont cvx $error /errorname get signalerror } if
+ pop exch pop
}
ifelse
exch .setglobal
More information about the gs-cvs
mailing list