/usr/share/ghostscript/8.70/lib
NameSizeModeActions
acctest.ps43240644editdlrm
addxchar.ps98480644editdlrm
align.ps23130644editdlrm
bdftops.ps234030644editdlrm
bj8.rpd6390644editdlrm
bj8gc12f.upp15280644editdlrm
bj8hg12f.upp15270644editdlrm
bj8oh06n.upp15130644editdlrm
bj8pa06n.upp15210644editdlrm
bj8pp12f.upp15380644editdlrm
bj8ts06n.upp15260644editdlrm
bjc610a0.upp15230644editdlrm
bjc610a1.upp15120644editdlrm
bjc610a2.upp15130644editdlrm
bjc610a3.upp15180644editdlrm
bjc610a4.upp15260644editdlrm
bjc610a5.upp15130644editdlrm
bjc610a6.upp15130644editdlrm
bjc610a7.upp15160644editdlrm
bjc610a8.upp15220644editdlrm
bjc610b1.upp15120644editdlrm
bjc610b2.upp15130644editdlrm
bjc610b3.upp15180644editdlrm
bjc610b4.upp15260644editdlrm
bjc610b6.upp15130644editdlrm
bjc610b7.upp15170644editdlrm
bjc610b8.upp15220644editdlrm
bjc6000a1.upp16600644editdlrm
bjc6000b1.upp16600644editdlrm
caption.ps17210644editdlrm
cbjc600.ppd110400644editdlrm
cbjc800.ppd113830644editdlrm
cdj550.upp16860644editdlrm
cdj690.upp19950644editdlrm
cdj690ec.upp20560644editdlrm
cid2code.ps44750644editdlrm
decrypt.ps3500644editdlrm
dmp_init.ps72460644editdlrm
dmp_site.ps4590644editdlrm
dnj750c.upp28040644editdlrm
dnj750m.upp19710644editdlrm
docie.ps73730644editdlrm
dumphint.ps200440644editdlrm
escp_24.src3500644editdlrm
font2c.ps195910644editdlrm
font2pcl.ps175680644editdlrm
ghostpdf.ppd256430644editdlrm
gslp.ps196430644editdlrm
gsnup.ps27250644editdlrm
gs_ce_e.ps23640644editdlrm
gs_cmdl.ps48440644editdlrm
gs_fform.ps31620644editdlrm
gs_il2_e.ps27770644editdlrm
gs_kanji.ps39420644editdlrm
gs_ksb_e.ps32910644editdlrm
gs_l.xbm19450644editdlrm
gs_l.xpm27510644editdlrm
gs_lgo_e.ps28860644editdlrm
gs_lgx_e.ps19120644editdlrm
gs_l_m.xbm19550644editdlrm
gs_m.xbm9450644editdlrm
gs_m.xpm14370644editdlrm
gs_m_m.xbm9550644editdlrm
gs_pfile.ps43490644editdlrm
gs_rdlin.ps8620644editdlrm
gs_s.xbm5940644editdlrm
gs_s.xpm9570644editdlrm
gs_s_m.xbm6040644editdlrm
gs_t.xbm3450644editdlrm
gs_t.xpm6050644editdlrm
gs_t_m.xbm3550644editdlrm
gs_wl1_e.ps25300644editdlrm
gs_wl2_e.ps25280644editdlrm
gs_wl5_e.ps25460644editdlrm
ht_ccsto.ps2281940644editdlrm
image-qa.ps733230644editdlrm
impath.ps55380644editdlrm
jispaper.ps9300644editdlrm
landscap.ps15250644editdlrm
level1.ps1100644editdlrm
lines.ps38680644editdlrm
markhint.ps34730644editdlrm
markpath.ps18900644editdlrm
mkcidfm.ps73050644editdlrm
necp2x.upp10410644editdlrm
necp2x6.upp10650644editdlrm
packfile.ps103580644editdlrm
pcharstr.ps35840644editdlrm
pdf2dsc.ps83770644editdlrm
PDFA_def.ps11700644editdlrm
pdfopt.ps365160644editdlrm
pdfwrite.ps116760644editdlrm
PDFX_def.ps18680644editdlrm
pf2afm.ps153510644editdlrm
pfbtopfa.ps11410644editdlrm
PM760p.upp11600644editdlrm
PM760pl.upp11240644editdlrm
PM820p.upp11420644editdlrm
PM820pl.upp11170644editdlrm
ppath.ps19740644editdlrm
pphs3910644editdlrm
pphs.ps69220644editdlrm
prfont.ps64870644editdlrm
printafm.ps37750644editdlrm
ps2ai.ps224850644editdlrm
ps2ascii.ps446180644editdlrm
ps2epsi.ps81870644editdlrm
quit.ps50644editdlrm
ras1.upp2110644editdlrm
ras3.upp2100644editdlrm
ras4.upp2160644editdlrm
ras8m.upp2050644editdlrm
ras24.upp2150644editdlrm
ras32.upp1920644editdlrm
rollconv.ps117650644editdlrm
s400a1.upp14540644editdlrm
s400b1.upp16030644editdlrm
sharp.upp19360644editdlrm
showchar.ps29320644editdlrm
showpage.ps90644editdlrm
sipixa6.upp5290644editdlrm
st640ih.upp22770644editdlrm
st640ihg.upp15040644editdlrm
st640p.upp19100644editdlrm
st640pg.upp11370644editdlrm
st640pl.upp18740644editdlrm
st640plg.upp11010644editdlrm
stc.upp19190644editdlrm
stc2.upp19000644editdlrm
stc2s_h.upp22680644editdlrm
stc2_h.upp18750644editdlrm
stc200_h.upp18440644editdlrm
stc300.upp21320644editdlrm
stc300bl.upp13370644editdlrm
stc300bm.upp14260644editdlrm
stc500p.upp18990644editdlrm
stc500ph.upp18990644editdlrm
stc600ih.upp22770644editdlrm
stc600p.upp11470644editdlrm
stc600pl.upp11110644editdlrm
stc640p.upp10910644editdlrm
Stc670p.upp11590644editdlrm
Stc670pl.upp11240644editdlrm
Stc680p.upp11400644editdlrm
Stc680pl.upp11150644editdlrm
stc740ih.upp21230644editdlrm
Stc740p.upp10390644editdlrm
Stc740pl.upp11150644editdlrm
Stc760p.upp11410644editdlrm
Stc760pl.upp11150644editdlrm
Stc777p.upp11400644editdlrm
Stc777pl.upp11150644editdlrm
stc800ih.upp21540644editdlrm
stc800p.upp11110644editdlrm
stc800pl.upp10930644editdlrm
stc1520h.upp21500644editdlrm
stcany.upp6690644editdlrm
stcany_h.upp6770644editdlrm
stcinfo.ps257330644editdlrm
stcolor.ps52210644editdlrm
stc_h.upp19090644editdlrm
stc_l.upp7300644editdlrm
stocht.ps26460644editdlrm
Stp720p.upp11580644editdlrm
Stp720pl.upp11150644editdlrm
Stp870p.upp11400644editdlrm
Stp870pl.upp11150644editdlrm
traceimg.ps15280644editdlrm
traceop.ps27340644editdlrm
type1enc.ps25360644editdlrm
type1ops.ps75760644editdlrm
uninfo.ps61360644editdlrm
unprot.ps19040644editdlrm
viewcmyk.ps21130644editdlrm
viewgif.ps45730644editdlrm
viewjpeg.ps49490644editdlrm
viewmiff.ps37780644editdlrm
viewpbm.ps53070644editdlrm
viewpcx.ps43450644editdlrm
viewps2a.ps12820644editdlrm
wftopfa.ps89230644editdlrm
winmaps.ps37430644editdlrm
wrfont.ps181680644editdlrm
zeroline.ps24630644editdlrm
Edit: /usr/share/ghostscript/8.70/lib/addxchar.ps (9848B)
% Copyright (C) 1999 Aladdin Enterprises. 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. % % For more information about licensing, please refer to % http://www.ghostscript.com/licensing/. For information on % commercial licensing, go to http://www.artifex.com/licensing/ or % contact Artifex Software, Inc., 101 Lucas Valley Road #110, % San Rafael, CA 94903, U.S.A., +1(415)492-9861. % $Id: addxchar.ps 6300 2005-12-28 19:56:24Z giles $ % Add the Central European and other Adobe extended Latin characters to a % Type 1 font. % Requires -dWRITESYSTEMDICT to disable access protection. (type1ops.ps) runlibfile % ---------------- Utilities ---------------- % /addce_dict 50 dict def addce_dict begin % Define the added copyright notice. /addednotice (. Portions Copyright (C) 1999 Aladdin Enterprises.) def % Open a font for modification by removing the FID and changing the % FontName. Removing UniqueID and XUID is not necessary, since we % will only be adding characters. /openfont { % openfont dup length dict copy dup /FID undef dup /FontName 3 index put } def % Do the equivalent of false charpath for a glyph. % This should really be an operator! /glyphpath { % glyphpath - currentfont /Encoding get 0 3 -1 roll put <00> false charpath } def % Do the equivalent of charpath + pathbbox for a glyph. /glyphbbox { % glyphbbox % We cache this value, because it's expensive to compute. BBoxes 1 index .knownget { exch pop } { gsave newpath 0 0 moveto dup glyphpath [pathbbox] grestore BBoxes 3 -1 roll 2 index put } ifelse aload pop } def % Get the side bearing and width for a glyph. /glyphsbw { % glyphsbw % We cache this value, because it's expensive to compute. SBW 1 index .knownget { exch pop } { dup glyphcs { dup /hsbw eq { pop exit } if } forall 2 array astore SBW 3 -1 roll 2 index put } ifelse aload pop } def % Get the CharString for a glyph, as an array. /glyphcs { % glyphcs CharStrings exch get 4330 exch dup length string .type1decrypt exch pop dup length lenIV sub lenIV exch getinterval 0 () /SubFileDecode filter [ exch charstack_read ] } def % Find an occurrence of a value in an array. /asearch { % asearch true % asearch false false 0 4 2 roll exch { % Stack: false index value element 2 copy eq { pop pop exch not exch dup exit } if exch 1 add exch } forall pop pop } def % Convert an array back to a CharString. /csdef { % csdef - charproc_string 4330 exch dup .type1encrypt exch pop readonly CharStrings 3 1 roll put } def % Split an accented character name. /splitaccented { % splitaccented dup =string cvs dup 0 1 getinterval cvn exch dup length 1 sub 1 exch getinterval cvn } def % Begin the definition of a 'seac' character. % Defines accent, base, abox, bbox. % The initial dx lines up the origins of the base and the accent. /beginseac { % beginseac % -mark- /hsbw /accent exch def /base exch def /abox [accent glyphbbox] def /bbox [base glyphbbox] def [ base glyphsbw /hsbw accent glyphsbw pop dup 4 index sub } def % Center the accent over the base of a 'seac' character. /centeraccent { % centeraccent bbox 2 get bbox 0 get add 2 div abox 2 get abox 0 get add 2 div sub add } def % Finish the definition of a 'seac' character. /finishseac { % -mark- ... finishseac - exch cvi exch cvi charindex base get charindex accent get /seac ] csdef } def % ---------------- Main program ---------------- % % Define accented characters that can be made with seac, % with the accent centered over the character. /seacchars [ /Abreve /Amacron /Cacute /Ccaron /Dcaron /Ecaron /Edotaccent /Emacron /Gbreve /Idotaccent /Imacron /Lacute /Nacute /Ncaron /Ohungarumlaut /Omacron /Racute /Rcaron /Sacute /Scedilla /Tcaron /Uhungarumlaut /Umacron /Uogonek /Uring /Zacute /Zdotaccent /abreve /amacron /cacute /ccaron /ecaron /edotaccent /emacron /gbreve /lacute /nacute /ncaron /ohungarumlaut /omacron /racute /rcaron /sacute /scedilla /uhungarumlaut /umacron /uring /zacute /zdotaccent ] def % Define seac characters where the accent lines up with the right % edge of the character. /seacrightchars [ /Aogonek /Eogonek /Iogonek /aogonek /eogonek /iogonek /uogonek ] def % Define seac characters where the caron becomes an appended quoteright. /seaccaronchars [ /dcaron /lcaron /tcaron ] def % Define seac characters using commaaccent. /seaccommachars [ /Gcommaaccent /Kcommaaccent /Lcommaaccent /Ncommaaccent /Rcommaaccent /Scommaaccent /Tcommaaccent /gcommaaccent /kcommaaccent /lcommaaccent /ncommaaccent /rcommaaccent /scommaaccent /tcommaaccent ] def % Define the characters copied from the Symbol font. /symbolchars [ /Delta /greaterequal /lessequal /lozenge /notequal /partialdiff /summation ] def % Define the procedures for editing the commaaccent character. % Delete all the hints, since it's too hard to adjust them. /caedit mark /rmoveto { exch commatop sub cvi exch } /hstem { pop pop pop } /vstem 1 index /callothersubr { dup 3 eq { 4 { pop } repeat /skip true def } if } /pop { skip { pop /skip false def } if } .dicttomark def /addce { % addce 20 dict begin /origfont 1 index def openfont dup /CharStrings 2 copy get dup length dict copy put dup /Encoding 2 copy get dup length array copy put dup /FontInfo 2 copy get dup length dict copy put definefont /font exch def currentdict font end begin begin font 1000 scalefont setfont /symbolfont /Symbol findfont def /BBoxes CharStrings length dict def /SBW CharStrings length dict def /italfactor FontInfo /ItalicAngle .knownget { neg dup sin exch cos div } { 0 } ifelse def % Invert the Encoding (needed for seac). /charindex 256 dict def 0 1 255 { charindex exch Encoding 1 index get exch put } for % Add the commaaccent character, by moving the comma downward. /comma glyphbbox /commatop exch def pop pop pop /comma glyphcs /skip false def [ exch { caedit 1 index .knownget { exec } if } forall ] /commaaccent exch csdef % Add the accented characters that can be made with seac. seacchars { splitaccented beginseac centeraccent % If the accent would collide with the base character, % raise it a little. abox 1 get bbox 3 get sub dup 0 le { % ... but not if the accent is in the low position. abox 1 get 0 gt { neg 60 add % Adjust the X position if italic. dup italfactor mul 3 -1 roll add exch } { pop 0 } ifelse } { pop 0 } ifelse finishseac } forall seacrightchars { splitaccented beginseac bbox 2 get abox 2 get sub add % line up right edges 0 finishseac } forall /dcroat /d /hyphen beginseac bbox 2 get abox 2 get sub add % line up right edges 0 finishseac /imacron /dotlessi /macron beginseac centeraccent 0 finishseac /Lcaron /L /quoteright beginseac bbox 2 get abox 2 get sub add % line up right edges 0 finishseac seaccaronchars { dup =string cvs 0 1 getinterval cvn /quoteright beginseac % Move the quote to the right of the character. bbox 2 get abox 0 get sub 50 add add % Adjust the character width as well. 4 -1 roll abox 2 get abox 0 get sub 50 add add cvi 4 1 roll 0 finishseac } forall seaccommachars { dup =string cvs 0 1 getinterval cvn /comma beginseac centeraccent commatop neg % Lower the accent if the character extends below % the baseline bbox 1 get 0 .min add finishseac } forall % Add the characters from the Symbol font. % We should scale them to match the FontBBox, but we don't. symbolchars { symbolfont /CharStrings get 1 index get CharStrings 3 1 roll put } forall % Add the one remaining character. CharStrings /Dcroat CharStrings /Eth get put % Recompute the FontBBox, since some of the accented characters % may have enlarged it. /llx 1000 def /lly 1000 def /urx 0 def /ury 0 def CharStrings { pop glyphbbox ury .max /ury exch def urx .max /urx exch def lly .min /lly exch def llx .min /llx exch def } forall /FontBBox llx cvi lly cvi urx ceiling cvi ury ceiling cvi 4 packedarray def % Restore the Encoding and wrap up. [/Copyright /Notice] { FontInfo 1 index .knownget { addednotice concatstrings FontInfo 3 1 roll put } { pop } ifelse } forall FontName font openfont dup /Encoding origfont /Encoding get put definefont end end } def currentdict end readonly pop % addce_dict /addce { addce_dict begin addce end } def % ---------------- Integration ---------------- % % We would like to patch the font loader so that it adds the extended % Latin characters automatically. We haven't done this yet. % ---------------- Test program ---------------- % /TEST where { pop TEST } { false } ifelse { /FONT where { pop } { /FONT /Palatino-Italic def } ifelse (unprot.ps) runlibfile unprot (wrfont.ps) runlibfile wrfont_dict begin /eexec_encrypt true def /binary_CharStrings true def end save FONT findfont /Latin-CE exch addce setfont (t.ce.pfb) (w) file dup writefont closefile restore (prfont.ps) runlibfile (t.ce.pfb) (r) file .loadfont /Latin-CE DoFont quit } if