PATH:
usr
/
share
/
ghostscript
/
lib
% Copyright (C) 2001-2018 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., 1305 Grant Avenue - Suite 200, Novato, % CA 94945, U.S.A., +1(415)492-9861, for further information. % % Construct an inverse map from CIDs to codes. % Create an inverse map from CIDs to code values. % We only use this for 16-bit Unicode, so it has some limitations. % After invoking .cmap2code, loading a CMap file prints out the map % instead of doing what it usually does. For example: % % gs -dNODISPLAY -dBATCH lib/cid2code.ps -c .cmap2code\ % -f Resource/CMap/UniJIS-UCS2-H > mapfile /.cmap2codedict 10 dict begin /begincmap { mark } def /endcmap { % Stack: mark code_lo1 code_hi1 cid1 ... 20 dict begin /depth counttomark 3 sub def % Do a first pass to determine the maximum CID. 0 0 3 depth { 1 add /d exch def d index d 2 add index 1 get add d 3 add index 1 get sub .max } for 1 add /ncid exch def /map ncid 2 mul string def % Now fill in the map. 0 3 depth { /d exch def d index 2 mul /cid2 exch def d 1 add index /hi exch def d 2 add index 2 string copy /lo exch def lo 1 get 1 hi 1 get { map cid2 lo 0 get put map cid2 1 add 3 -1 roll put /cid2 cid2 2 add def } for } for % Print the map. (%stdout) (w) file dup (<) print dup /ASCIIHexEncode filter dup map writestring closefile () = flush closefile end } def %/begincodespacerange /endcodespacerange {cleartomark} def %/usecmap %/beginbfchar /endbfchar {cleartomark} def %/beginbfrange /endbfrange {cleartomark} def %/begincidchar /endcidchar { counttomark 2 idiv { dup counttomark 1 add 3 roll } repeat pop } def %/begincidrange /endcidrange { counttomark 1 add -1 roll pop } def %/beginnotdefchar /endnotdefchar {cleartomark} def %/beginnotdefrange /endnotdefrange {cleartomark} def currentdict end readonly def /.cmap2code { % - .cmap2code - /CIDInit /ProcSet findresource dup length dict copy .cmap2codedict { 3 copy put pop pop } forall /CIDInit exch /ProcSet defineresource pop } def % Extract and print reverse mapping information from a cid2code.txt file. /.printhex2 { % <int16> .printhex2 - (<) print 16#10000 add 16 =string cvrs 1 4 getinterval print (>) print } def /.cid2code { % <cmaptemplate> <file> <column> .cid2code - 30 dict begin /column exch def (r) file /f exch def (%!) = (/CIDInit /ProcSet findresource begin 12 dict begin begincmap) = % Print the information from the template. { exch ==only ( ) print dup type /dicttype eq { dup length =only ( dict dup begin) = { ( ) print exch ===only ( ) print ===only ( def) = } forall (end def) = } { ===only } ifelse ( def) = } forall % Read the data from the cid2code.txt file. { f =string readline pop (CID\t) anchorsearch { pop pop exit } if pop } loop /map [ { f =string readline not { pop exit } if column { (\t) search pop pop pop } repeat (\t) search { exch pop exch pop } if (,) search { exch pop exch pop } if dup length 4 ne { pop (*) } if dup (*) eq { pop (0000) } if (16#) exch concatstrings cvi } loop ] def % Print the code space range(s). /maxcid map length 1 sub def mark maxcid dup 255 and 255 eq { 0 exch } { dup 16#ff00 and exch 0 2 index 1 sub } ifelse counttomark 2 idiv dup =only ( begincodespacerange) = { exch .printhex2 .printhex2 () = } repeat (endcodespacerange) = % Print the map data. 0 1 100 maxcid { /lo exch def /hi lo 99 add maxcid .min def 0 lo 1 hi { map exch get 0 ne { 1 add } if } for dup 0 eq { pop } { =only ( begincidchar) = lo 1 hi { map 1 index get dup 0 eq { pop pop } { exch .printhex2 = } ifelse } for (endcidchar) = } ifelse } for % Wrap up. (endcmap CMapName currentdict /CMap defineresource pop end end) = f closefile end } bind def
[-] rollconv.ps
[edit]
[-] acctest.ps
[edit]
[-] bjc610b7.upp
[edit]
[-] viewps2a.ps
[edit]
[-] ras3.upp
[edit]
[-] stc1520h.upp
[edit]
[-] stc800p.upp
[edit]
[-] PM820p.upp
[edit]
[-] st640ih.upp
[edit]
[-] stc_l.upp
[edit]
[-] bj8gc12f.upp
[edit]
[-] bj8oh06n.upp
[edit]
[-] viewmiff.ps
[edit]
[-] docie.ps
[edit]
[-] viewgif.ps
[edit]
[-] gs_wl2_e.ps
[edit]
[-] printafm.ps
[edit]
[-] Stp720p.upp
[edit]
[-] st640plg.upp
[edit]
[-] sipixa6.upp
[edit]
[-] lines.ps
[edit]
[-] caption.ps
[edit]
[-] bjc610a0.upp
[edit]
[-] cbjc600.ppd
[edit]
[-] pphs.ps
[edit]
[-] bjc6000a1.upp
[edit]
[-] dnj750m.upp
[edit]
[-] cdj690ec.upp
[edit]
[-] viewpbm.ps
[edit]
[-] Stp720pl.upp
[edit]
[-] cdj550.upp
[edit]
[-] Stc670p.upp
[edit]
[+]
..
[-] gs_il2_e.ps
[edit]
[-] ras24.upp
[edit]
[-] gs_t.xpm
[edit]
[-] bjc610b6.upp
[edit]
[-] stocht.ps
[edit]
[-] viewpcx.ps
[edit]
[-] gs_l_m.xbm
[edit]
[-] gs_s.xbm
[edit]
[-] image-qa.ps
[edit]
[-] landscap.ps
[edit]
[-] dmp_site.ps
[edit]
[-] bjc610a4.upp
[edit]
[-] necp2x.upp
[edit]
[-] align.ps
[edit]
[-] ps2epsi.ps
[edit]
[-] gslp.ps
[edit]
[-] stc740ih.upp
[edit]
[-] bj8.rpd
[edit]
[-] gs_ce_e.ps
[edit]
[-] st640ihg.upp
[edit]
[-] ghostpdf.ppd
[edit]
[-] stc600ih.upp
[edit]
[-] Stc680pl.upp
[edit]
[-] stc.upp
[edit]
[-] stcany_h.upp
[edit]
[-] gs_t_m.xbm
[edit]
[-] stcinfo.ps
[edit]
[-] gs_wl5_e.ps
[edit]
[-] stc500ph.upp
[edit]
[-] gs_wl1_e.ps
[edit]
[-] stc300bl.upp
[edit]
[-] gs_l.xpm
[edit]
[-] ras32.upp
[edit]
[-] winmaps.ps
[edit]
[-] stc500p.upp
[edit]
[-] bjc6000b1.upp
[edit]
[-] mkcidfm.ps
[edit]
[-] pdf2dsc.ps
[edit]
[-] bjc610b8.upp
[edit]
[-] pf2afm.ps
[edit]
[-] s400b1.upp
[edit]
[-] traceimg.ps
[edit]
[-] traceop.ps
[edit]
[-] Stc760pl.upp
[edit]
[-] stc300bm.upp
[edit]
[-] st640pg.upp
[edit]
[-] stc600p.upp
[edit]
[-] st640p.upp
[edit]
[-] Stc777p.upp
[edit]
[-] uninfo.ps
[edit]
[-] ps2ai.ps
[edit]
[-] gs_l.xbm
[edit]
[-] bjc610a2.upp
[edit]
[-] gs_t.xbm
[edit]
[-] bj8hg12f.upp
[edit]
[-] Stp870pl.upp
[edit]
[-] prfont.ps
[edit]
[-] bj8pa06n.upp
[edit]
[-] gs_lgo_e.ps
[edit]
[-] gs_ksb_e.ps
[edit]
[-] stc800pl.upp
[edit]
[-] gs_kanji.ps
[edit]
[-] font2pcl.ps
[edit]
[-] Stc740p.upp
[edit]
[-] stc200_h.upp
[edit]
[-] bjc610a8.upp
[edit]
[-] viewjpeg.ps
[edit]
[-] pfbtopfa.ps
[edit]
[-] bjc610b2.upp
[edit]
[-] necp2x6.upp
[edit]
[-] gs_s.xpm
[edit]
[-] jispaper.ps
[edit]
[-] ppath.ps
[edit]
[-] ras4.upp
[edit]
[-] bjc610a1.upp
[edit]
[-] Stc777pl.upp
[edit]
[-] Stc760p.upp
[edit]
[-] stc300.upp
[edit]
[-] stcany.upp
[edit]
[-] gs_s_m.xbm
[edit]
[-] stc_h.upp
[edit]
[-] ras8m.upp
[edit]
[-] bjc610a6.upp
[edit]
[-] gs_m_m.xbm
[edit]
[-] gs_m.xpm
[edit]
[-] stc600pl.upp
[edit]
[-] stc2s_h.upp
[edit]
[-] bjc610a7.upp
[edit]
[-] PM820pl.upp
[edit]
[-] cid2code.ps
[edit]
[-] bjc610a5.upp
[edit]
[-] stc640p.upp
[edit]
[-] ht_ccsto.ps
[edit]
[-] cdj690.upp
[edit]
[-] st640pl.upp
[edit]
[-] PDFX_def.ps
[edit]
[-] bjc610a3.upp
[edit]
[-] zeroline.ps
[edit]
[-] dmp_init.ps
[edit]
[-] Stc680p.upp
[edit]
[-] PM760p.upp
[edit]
[-] bjc610b3.upp
[edit]
[-] PM760pl.upp
[edit]
[-] sharp.upp
[edit]
[-] stc2_h.upp
[edit]
[-] bj8ts06n.upp
[edit]
[-] stc800ih.upp
[edit]
[-] bjc610b4.upp
[edit]
[-] dnj750c.upp
[edit]
[-] bj8pp12f.upp
[edit]
[-] stc2.upp
[edit]
[-] s400a1.upp
[edit]
[-] bjc610b1.upp
[edit]
[-] viewcmyk.ps
[edit]
[-] PDFA_def.ps
[edit]
[-] cbjc800.ppd
[edit]
[-] ras1.upp
[edit]
[-] gs_lgx_e.ps
[edit]
[-] Stp870p.upp
[edit]
[-] escp_24.src
[edit]
[-] stcolor.ps
[edit]
[-] Stc740pl.upp
[edit]
[-] gs_m.xbm
[edit]
[-] Stc670pl.upp
[edit]
[-] gsnup.ps
[edit]