[gs-cvs] rev 7033 - trunk/gs/lib
lpd at ghostscript.com
lpd at ghostscript.com
Mon Sep 11 00:02:19 PDT 2006
Author: lpd
Date: 2006-09-11 00:02:18 -0700 (Mon, 11 Sep 2006)
New Revision: 7033
Modified:
trunk/gs/lib/gs_fonts.ps
Log:
Replaces the unnecessary extra 'stopped' around uses of .completefont
(introduced in 7017) with uses of .errorexec, which was created for exactly
this purpose; restructures .completefont slightly so if .buildfontxxx
signals an error, that error will be reported rather than invalidfont.
(This behavior matches the Adobe interpreters.)
Modified: trunk/gs/lib/gs_fonts.ps
===================================================================
--- trunk/gs/lib/gs_fonts.ps 2006-09-11 03:32:51 UTC (rev 7032)
+++ trunk/gs/lib/gs_fonts.ps 2006-09-11 07:02:18 UTC (rev 7033)
@@ -460,11 +460,18 @@
} if
} if
exch {
- dup /FontType get //buildfontdict exch get exec
+ dup /FontType get //buildfontdict exch get
} {
- .buildcidfont
+ {.buildcidfont} % so it gets bound
} ifelse
+ } stopped { $error /command get /invalidfont signalerror } if
+ % Execute the .buildxxxfontx outside the 'stopped', because we don't
+ % want its errors converted to invalidfont.
+ exec
+
+ {
+
DISKFONTS {
FontFileDirectory 2 index known {
dup /FontFile FontFileDirectory 4 index get .growput
@@ -475,13 +482,10 @@
/ProvideUnicodeDecoding get exec
} if
readonly % stack: name fontdict
- } stopped { /.completefont cvx /invalidfont signalerror } if
-} bind odef
+ } stopped { $error /command get /invalidfont signalerror } if
+} bind def
/definefont
- { % 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
+ { /definefont cvx {.completefont} .errorexec
% If the current allocation mode is global, also enter
% the font in LocalFontDirectory.
.currentglobal
@@ -539,11 +543,7 @@
% Don't bind in definefont, since Level 2 redefines it.
/definefont .systemvar exec
}
- { % 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
+ { /findfont cvx {.completefont} .errorexec pop exch pop
}
ifelse
exch .setglobal
More information about the gs-cvs
mailing list