[gs-cvs] gs/lib
Igor Melichev
igor at casper.ghostscript.com
Tue Feb 26 09:49:14 PST 2002
Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv18444/gs/lib
Modified Files:
FAPIconfig gs_fapi.ps gs_fonts.ps
Log Message:
FAPI project : Changing the logics of loading GS fonts with FAPI :
now all fonts listed in fontmap are being loaded with GS font loader
and then are passed to FAPI in same way as embedded fonts.
Index: FAPIconfig
===================================================================
RCS file: /cvs/ghostscript/gs/lib/FAPIconfig,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- FAPIconfig 21 Feb 2002 21:49:28 -0000 1.4
+++ FAPIconfig 26 Feb 2002 17:49:12 -0000 1.5
@@ -4,8 +4,8 @@
/FontPath (/Fonts) % A default directory for FAPI-handled fonts.
/CIDFontPath (/CIDFonts) % A default directory for FAPI-handled CID fonts (may be same as above).
-/HookDiskFonts [1 9 2 11 42] % FontType values for disk PS fonts to be redirected to FAPI.
-/HookEmbeddedFonts [1 9 2 11 42] % FontType values for embedded PS fonts to be redirected to FAPI.
+/HookDiskFonts [1 2 9 11 42] % FontType values for disk PS fonts to be redirected to FAPI.
+/HookEmbeddedFonts [1 2 9 11 42] % FontType values for embedded PS fonts to be redirected to FAPI.
% Values allowed for HookDiskFonts and HookEmbeddedFonts are 1, 2, 9, 11, 42.
% "Disk fonts" are fonts being installed to Ghostscript with 'fontmap' or with GS_FONTPATH,
Index: gs_fapi.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_fapi.ps,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gs_fapi.ps 21 Feb 2002 21:49:28 -0000 1.13
+++ gs_fapi.ps 26 Feb 2002 17:49:12 -0000 1.14
@@ -363,14 +363,20 @@
% The procedure .FAPIhook redirects PS fonts to FAPI on necessity.
% This depends on the following conditions :
%
-% 1. If font dictionary has /FAPI entry, it is a font listed in extfontmap,
-% and must be build with .FAPIrebuildfont .
+% 1. If font dictionary has /FAPI entry, it is a font listed in FAPIconfig.FontPath,
+% and must be build with .FAPIrebuildfont, or a copy of a font, which was
+% built with .FAPIrebuildfont .
%
-% 2. If the font dictionary has /Path entry, and has no /FAPI entry,
+% 2. If the font dictionary has /PathLoad entry, and has no /FAPI entry,
% it is an installed PS font, which is described in lib/fontmap or
-% in GS_FONTPATH. .loadfont inserts /Path entry for this case
+% in GS_FONTPATH. .loadfont inserts /PathLoad entry for this case
% (see gs_fonts.ps).
%
+% Installed fonts are being loaded with GS font loader,
+% the they are passed to FAPI is same way as embedded fonts are.
+% We do so because UFST cannot read fonts, which don't
+% follow Type 1/42 file format strongly.
+%
% 3. Executing .loadfont, we place /FAPI_hook_disable in the 0th
% element of some procedure on the execution stack - see gs_fonts.ps .
% If FAPI_hook finds /FAPI_hook_disable in there,
@@ -386,7 +392,7 @@
% Hook_Disk_Fonts controls disk PS fonts (which fall into (2) and (3) ).
% Hook_Embedded_Fonts controls fonts being embedded into documents.
%
-% 6. We apply the operator .passtoFAPI for checking whether FAPI can handle a font.
+% 7. We apply the operator .passtoFAPI for checking whether FAPI can handle a font.
% If so, we insert /FAPI entry into the font dictionary and convert it
% with .FAPIrebuildfont . Otherwise the font is handled with the native GS font renderer.
@@ -507,8 +513,8 @@
{ //PrintFontRef exec ( is mapped to FAPI=) print dup /FAPI get = } //FAPI_hook_warn exec
true //.FAPIrebuildfont //FAPI_choose_decoding exec
} {
- dup /Path known dup {
- { (Path known for the font ) print //PrintFontRef exec (.) = } //FAPI_hook_debug exec
+ dup /PathLoad known dup {
+ { (PathLoad known for the font ) print //PrintFontRef exec (.) = } //FAPI_hook_debug exec
} {
pop //FAPI_is_hook_disabled exec dup
{ pop
@@ -569,3 +575,4 @@
odef odef odef odef odef odef
.setlanguagelevel
+
Index: gs_fonts.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_fonts.ps,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gs_fonts.ps 21 Feb 2002 21:49:28 -0000 1.19
+++ gs_fonts.ps 26 Feb 2002 17:49:12 -0000 1.20
@@ -914,7 +914,7 @@
% Check to make sure the font was actually loaded.
dup 3 index .fontknownget
- { dup /Path 4 index .putgstringcopy
+ { dup /PathLoad 4 index .putgstringcopy
4 1 roll pop pop pop true exit
} if
@@ -926,7 +926,7 @@
{ % Stack: origfontname fontdirectory path filefontname
2 index 1 index .fontknownget
{ % Yes. Stack: origfontname fontdirectory path filefontname fontdict
- dup 4 -1 roll /Path exch .putgstringcopy
+ dup 4 -1 roll /PathLoad exch .putgstringcopy
% Stack: origfontname fontdirectory filefontname fontdict
3 -1 roll pop exch
% Stack: origfontname fontdict filefontname
More information about the gs-cvs
mailing list