Re: bug? /Font resourceforall generates undefinedresource error

[email protected] (Perry Hutchison)
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <56175382.9SsYRIOjBq5MoS24%[email protected]>
Ken Sharp <[email protected]> wrote:
> At 01:20 08/10/2015 -0700, Perry Hutchison wrote:
> >When attempting to enumerate available fonts using the method
> >recommended in the PostScript Language Reference Manual, I am
> >getting an undefinedresource error.
>
> Well the absolute *first* thing you should do is upgrade to a version of 
> Ghostscript which is less than 5 years old. The current version is 9.18 you 
> appear to be using 8.71.

Latest I could find (prebuilt, thus one hopes built correctly)
for my system is 9.06, which at least is the same major release
as current and looks to be maybe 3 years old :)  The result is
not identical, but very similar :(

> After that we would need to know if you have built Ghostscript using the 
> ROM file system or not, if you have not used the ROM file system then we 
> would need ot know the contents of your FontMap.GS and cidfmap files.

I think it is not using the ROM file system, since it is looking for
files like gs_init.ps in the OS file system.

I don't see anything as obvious as broken syntax in either Fontmap.GS
or cidfmap, but cidfmap does (try to) define HYGoThic-Medium and
HYRGoThic-Medium; and the "Munhwa" fonts to which those definitions
refer do not seem to have been provided in either the ghostscript
package or any of its dependencies.

I had supposed that that might be the cause of the error, but after
commenting out those 3 lines -- so that there is no uncommented
mention of HYGoThic, HYRGoThic, or Munhwa -- it still happens!?

BTW the cidfmap file shown below is exactly as packaged/installed:
the 4 lines that would map Munhwa fonts to themselves are commented
out in the package as distributed.

Results (from same gs command as before):

==== stderr ====
GPL Ghostscript 9.06: Unrecoverable error, exit code 1

==== stdout ====
GPL Ghostscript 9.06 (2012-08-08)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedresource in /HYRGoThic-Medium
Operand stack:
   --dict:0/20(L)--   true   (*)   --nostringval--   (HYRGoThic-Medium-GB-Vty-H0UTF16-VV32-HV32-H\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)   (*)   --nostringval--   (HYRGoThic-Medium-GB-Vty-H0UTF16-VV32-HV32-H\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\00
 0\000\000\000\000\000\000\000\000\000\000\000\000)   --dict:168/320(L)--   --dict:610/720(L)--   HYRGoThic-Medium-GB-V   HYRGoThic-Medium   GB-V   HYRGoThic-Medium
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1910   1   3   %oparray_pop   1909   1   3   %oparray_pop   1893   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   1863   4   3   %oparray_pop   --nostringval--   --nostringval--   --nostringval--   --dict:44/80(L)--   --nostringval--   105   %dict_continue   --nostringval--   --dict:168/320(L)--   --nostringval--   512   %dict_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1168/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:20/27(ro)(G)--   --dict:20/27(ro)(G)--   --dict:20/26(ro)(G)--
Current allocation mode is local
Last OS error: No such file or directory

==== cidfmap ====
%!
% This is a sample map file for CIDFont category.

%
% The map is a set of records, which must use one of the two formats :
%
% 1. A substutution of a CIF font with another CID font :
%
%    /substituted /original ;
%
%    Where 'substituted' is a name being used in a document,
%    'original' is a name of an available resource.
%
% 2. A substutution of a CIF font with a True Type font :
%
%    /substituted << /FileType /TrueType /Path (path) /SunfontID 1 /CSI [(ordering) supplement] >> ;
%
%    Where 'substituted' is a name being used in a document,
%    'path' is a path to a True Type font file,
%    'ordering' is a value of Ordering required for CIDSystemInfo dictionary,
%    'supplement' is a value of Supplement required for CIDSystemInfo dictionary.
%
%    The Ordering, and Registry (if present) entries should be PostScript string types
%    ie enclosed in parentheses, not PostScript name type (initial character '/'). See
%    gs/doc/Use.htm#CIDFontSubstitution
%
% Examples :
%    
%   /ShinGo-Bold   /HeiseiKakuGo-W5 ;
%   /Ryumin-Medium << /FileType /TrueType /Path (H:/AuxFiles/Fonts/BATANG.TTC) /SubfontID 3 /CSI [(Japan1) 2] >> ;
%   /Ryumin-Medium << /FileType /TrueType /Path (windir) getenv not {(c:/windows)}if (/Fonts/BATANG.TTC)concatstrings /SubfontID 3 /CSI [(Japan1) 2] >> ;
/Ryumin-Light << /FileType /TrueType /Path (Ryumin-Light) /SubfontID 0 /CSI [(Japan1) 6] >> ;
/GothicBBB-Medium << /FileType /TrueType /Path (GothicBBB-Medium) /SubfontID 0 /CSI [(Japan1) 6] >> ;

/Ryumin-Medium		/Ryumin-Light ;
/Ryumin-Regular		/Ryumin-Light ;
/RyuminPro-Light	/Ryumin-Light ;

/GothicBBBPro-Medium	/GothicBBB-Medium ;

/KozGoPro-Bold		/GothicBBB-Medium ;
/KozGoPro-Heavy		/GothicBBB-Medium ;
/KozGoPro-Medium	/GothicBBB-Medium ;
/KozGoPro-Regular	/GothicBBB-Medium ;

/KozMinPro-Bold		/Ryumin-Light ;
/KozMinPro-Light	/Ryumin-Light ;
/KozMinPro-Medium	/Ryumin-Light ;
/KozMinPro-Regular	/Ryumin-Light ;

/HiraKakuPro-W3		/GothicBBB-Medium ;
/HiraKakuPro-W6		/GothicBBB-Medium ;
/HiraKakuStd-W8		/GothicBBB-Medium ;

/HiraMaruPro-W4		/GothicBBB-Medium ;

/HiraMinPro-W3		/Ryumin-Light ;

/HeiseiMin-W3		/Ryumin-Light ;
/HeiseiKakuGo-W5	/GothicBBB-Medium ;

/FutoMinA101-Bold	/Ryumin-Light ;
/FutoMinA101Pro-Bold	/Ryumin-Light ;
/FutoGoB101-Bold	/GothicBBB-Medium ;
/FutoGoB101Pro-Bold	/GothicBBB-Medium ;

/Jun101-Light		/Ryumin-Light ;
/Jun101Pro-Light	/Ryumin-Light ;

/MidashiGo-MB31		/GothicBBB-Medium ;
/MidashiGoPro-MB31	/GothicBBB-Medium ;

/MidashiMinPro-MA31	/Ryumin-Light ;

/MS-Mincho		/Ryumin-Light ;
/MS-PMincho		/Ryumin-Light ;
/MS-Gothic		/GothicBBB-Medium ;
/MS-PGothic		/GothicBBB-Medium ;

%/Munhwa-Regular	/Munhwa-Regular ;
%/MunhwaGothic-Regular	/MunhwaGothic-Regular ;
%/Munhwa-Bold		/Munhwa-Bold ;
%/MunhwaGothic-Bold	/MunhwaGothic-Bold ;

/HYGoThic-Medium	/MunhwaGothic-Regular ;
/HYSMyeongJo-Medium	/Munhwa-Regular ;
/HYRGoThic-Medium	/MunhwaGothic-Bold ;

/STHeiti-Regular << /FileType /TrueType /Path (STHeiti-Regular) /SubfontID 0 /CSI [(CNS1) 5] >> ;
/STSong-Light << /FileType /TrueType /Path (STSong-Light) /SubfontID 0 /CSI [(GB1) 5] >> ;
/MSung-Light << /FileType /TrueType /Path (MSung-Light) /SubfontID 0 /CSI [(CNS1) 5] >> ;
/MHei-Medium << /FileType /TrueType /Path (MHei-Medium) /SubfontID 0 /CSI [(GB1) 5] >> ;
%
%   NOTE: getenv returns a boolean to indicate success of or failure, as well as the value on success. In the example, it uses this
%         to include a default value should getenv fail.

==== Fontmap.GS (most blank lines & comments removed) ====
% Copyright (C) 2001-2012 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
% implied.
%
% This software is distributed under license and may not be copied,
% modified or distributed except as expressly authorized under the terms
% of the license contained in the file LICENSE in this distribution.
%
% Refer to licensing information at http://www.artifex.com or contact
% Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
% CA  94903, U.S.A., +1(415)492-9861, for further information.

% Fontmap - standard font catalog for Ghostscript.

/Bookman-Demi			/URWBookmanL-DemiBold	;
/Bookman-DemiItalic		/URWBookmanL-DemiBoldItal	;
/Bookman-Light			/URWBookmanL-Ligh	;
/Bookman-LightItalic		/URWBookmanL-LighItal	;
/Courier			/NimbusMonL-Regu	;
/Courier-Oblique		/NimbusMonL-ReguObli	;
/Courier-Bold			/NimbusMonL-Bold	;
/Courier-BoldOblique		/NimbusMonL-BoldObli	;
/AvantGarde-Book		/URWGothicL-Book	;
/AvantGarde-BookOblique		/URWGothicL-BookObli	;
/AvantGarde-Demi		/URWGothicL-Demi	;
/AvantGarde-DemiOblique		/URWGothicL-DemiObli	;
/Helvetica			/NimbusSanL-Regu	;
/Helvetica-Oblique		/NimbusSanL-ReguItal	;
/Helvetica-Bold			/NimbusSanL-Bold	;
/Helvetica-BoldOblique		/NimbusSanL-BoldItal	;
/Helvetica-Narrow		/NimbusSanL-ReguCond	;
/Helvetica-Narrow-Oblique	/NimbusSanL-ReguCondItal	;
/Helvetica-Narrow-Bold		/NimbusSanL-BoldCond	;
/Helvetica-Narrow-BoldOblique	/NimbusSanL-BoldCondItal	;
/Palatino-Roman			/URWPalladioL-Roma	;
/Palatino-Italic		/URWPalladioL-Ital	;
/Palatino-Bold			/URWPalladioL-Bold	;
/Palatino-BoldItalic		/URWPalladioL-BoldItal	;
/NewCenturySchlbk-Roman		/CenturySchL-Roma	;
/NewCenturySchlbk-Italic	/CenturySchL-Ital	;
/NewCenturySchlbk-Bold		/CenturySchL-Bold	;
/NewCenturySchlbk-BoldItalic	/CenturySchL-BoldItal	;
/Times-Roman			/NimbusRomNo9L-Regu	;
/Times-Italic			/NimbusRomNo9L-ReguItal	;
/Times-Bold			/NimbusRomNo9L-Medi	;
/Times-BoldItalic		/NimbusRomNo9L-MediItal	;
/Symbol				/StandardSymL	;
/ZapfChancery-MediumItalic	/URWChanceryL-MediItal	;
/ZapfDingbats			/Dingbats	;
/CharterBT-Roman		(bchr.pfa)	;
/CharterBT-Italic		(bchri.pfa)	;
/CharterBT-Bold			(bchb.pfa)	;
/CharterBT-BoldItalic		(bchbi.pfa)	;
/Charter-Roman			/CharterBT-Roman	;
/Charter-Italic			/CharterBT-Italic	;
/Charter-Bold			/CharterBT-Bold		;
/Charter-BoldItalic		/CharterBT-BoldItalic	;
/Utopia-Regular		(putr.pfa)	;
/Utopia-Italic		(putri.pfa)	;
/Utopia-Bold		(putb.pfa)	;
/Utopia-BoldItalic	(putbi.pfa)	;
/URWAntiquaT-RegularCondensed	(u003043t.gsf)	;
/URWGroteskT-Bold		(u004006t.gsf)	;
/Calligraphic-Hiragana		(fhirw.gsf)	;
/Calligraphic-Katakana		(fkarw.gsf)	;
/Shareware-Cyrillic-Regular	(fcyr.gsf)	;
/Shareware-Cyrillic-Italic	(fcyri.gsf)	;
/Cyrillic			/Cyrillic-Regular	;
/Cyrillic-Regular		/Shareware-Cyrillic-Regular	;
/Cyrillic-Italic		/Shareware-Cyrillic-Italic	;
/Hershey-Gothic-English		(hrger.pfa)	;	% 5066533
/Hershey-Gothic-German		(hrgrr.pfa)	;
/Hershey-Gothic-Italian		(hritr.pfa)	; 
/Hershey-Plain-Duplex		(hrpld.pfa)	;
/Hershey-Plain-Duplex-Italic	(hrpldi.pfa)	;
/Hershey-Plain-Triplex		(hrplt.pfa)	;
/Hershey-Plain-Triplex-Italic	(hrplti.pfa)	;
/Hershey-Script-Complex		(hrscc.pfa)	;
/Hershey-Script-Simplex		(hrscs.pfa)	;	% 5066541
/Hershey-Gothic-English-Bold		(hrgerb.gsf)	;	% 5066542
/Hershey-Gothic-English-Oblique		(hrgero.gsf)	;
/Hershey-Gothic-English-SemiBold	(hrgerd.gsf)	;
/Hershey-Gothic-German-Bold		(hrgrrb.gsf)	;
/Hershey-Gothic-German-Oblique		(hrgrro.gsf)	;
/Hershey-Gothic-Italian-Bold		(hritrb.gsf)	;
/Hershey-Gothic-Italian-Oblique		(hritro.gsf)	;
/Hershey-Plain-Duplex-Bold		(hrpldb.gsf)	;
/Hershey-Plain-Duplex-Bold-Italic	(hrpldbi.gsf)	;
/Hershey-Plain-Triplex-Bold		(hrpltb.gsf)	;
/Hershey-Plain-Triplex-Bold-Italic	(hrpltbi.gsf)	;
/Hershey-Script-Complex-Bold		(hrsccb.gsf)	;
/Hershey-Script-Complex-Oblique		(hrscco.gsf)	;
/Hershey-Script-Simplex-Bold		(hrscsb.gsf)	;
/Hershey-Script-Simplex-Oblique		(hrscso.gsf)	;	% 5066556
/Hershey-Greek-Complex			(hrgkc.gsf)	;	% 5066557
/Hershey-Greek-Simplex			(hrgks.gsf)	;
/Hershey-Plain				(hrplr.gsf)	;
/Hershey-Plain-Simplex			(hrpls.gsf)	;	% 5066560
/Hershey-Plain-Bold			(hrplrb.gsf)	;	% 5066561
/Hershey-Plain-Bold-Oblique		(hrplrbo.gsf)	;
/Hershey-Plain-Oblique			(hrplro.gsf)	;
/Hershey-Plain-Simplex-Bold		(hrplsb.gsf)	;
/Hershey-Plain-Simplex-Bold-Oblique	(hrplsbo.gsf)	;
/Hershey-Plain-Simplex-Oblique		(hrplso.gsf)	;	% 5066566
/Hershey-Symbol				(hrsyr.gsf)	;	% 5066567
/Arial					/ArialMT		;
/Arial,Bold				/Arial-BoldMT		;
/Arial,Italic				/Arial-ItalicMT		;
/Arial,BoldItalic			/Arial-BoldItalicMT	;
/TimesNewRoman				/TimesNewRomanPSMT		;
/TimesNewRoman,Bold			/TimesNewRomanPS-BoldMT		;
/TimesNewRoman,Italic			/TimesNewRomanPS-ItalicMT	;
/TimesNewRoman,BoldItalic		/TimesNewRomanPS-BoldItalicMT	;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.