diff options
Diffstat (limited to 'Master/tlpkg/tlgs/lib/rollconv.ps')
-rw-r--r-- | Master/tlpkg/tlgs/lib/rollconv.ps | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/Master/tlpkg/tlgs/lib/rollconv.ps b/Master/tlpkg/tlgs/lib/rollconv.ps index be156a2d93d..f399be76b36 100644 --- a/Master/tlpkg/tlgs/lib/rollconv.ps +++ b/Master/tlpkg/tlgs/lib/rollconv.ps @@ -1,7 +1,7 @@ %! % Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. -% $Id: rollconv.ps 6300 2005-12-28 19:56:24Z giles $ +% $Id$ % Utility program for converting Japanese fonts produced by Macromedia's % Rollup program to Type 0 fonts suitable for use with Ghostscript. % @@ -57,13 +57,12 @@ % or % /HGGothicBPRO-83pv-RKSJ-H 36 selectfont - /macrfile % <filename> macrfile <file> { (r) file fromMac { % Get rid of the initial Mac garbage (128 characters). - % The garbage at the end is unpredictable, - % so we'll just have to hope that it's all nulls. + % The garbage at the end is unpredictable, + % so we'll just have to hope that it's all nulls. dup =string 0 128 getinterval readstring pop pop } if @@ -79,7 +78,7 @@ /inprefix InDir (/) concatstrings FName concatstrings (-) concatstrings def /inh inprefix (H) concatstrings def - % Open the output file. + % Open the output file. /OutDot OutDir (/) concatstrings OutBase concatstrings (.) concatstrings def /outname OutDot (ps) concatstrings def @@ -89,7 +88,7 @@ QUIET not { (Writing ) print outname = flush } if /out outname (w) file def /buffer 65000 string def - % Copy the initial comments from the input file. + % Copy the initial comments from the input file. inh macrfile { dup =string readline pop @@ -98,7 +97,7 @@ inh macrfile } loop - % Write out our preamble. + % Write out our preamble. out ( currentpacking true setpacking @@ -142,13 +141,13 @@ userdict /AltsysCFD3 25 dict dup begin { privates exch get 3 1 roll pop pop } { 7 dict begin - /MinFeature{16 16}executeonly def - /BlueValues BlueValues def - /StdVW 3 -1 roll 1 array astore def - /StdHW 3 -1 roll 1 array astore def - /password 5839 def - /LanguageGroup 1 def - /Subrs Subrs def + /MinFeature{16 16}executeonly def + /BlueValues BlueValues def + /StdVW 3 -1 roll 1 array astore def + /StdHW 3 -1 roll 1 array astore def + /password 5839 def + /LanguageGroup 1 def + /Subrs Subrs def currentdict readonly end privates 2 index 2 index put exch pop } @@ -178,7 +177,7 @@ end put %END ) writestring - % Locate and copy the definition of NotDefFont. + % Locate and copy the definition of NotDefFont. out ( FontDirectory /NotDefFont known { (%END) .skipeof } if @@ -195,9 +194,9 @@ loop out (definefont pop %END ) writestring - % Copy the definitions of the subfonts, moving the - % CharStrings of the Roman supplement to an external file. - % Stack for pattern procedures: infile line + % Copy the definitions of the subfonts, moving the + % CharStrings of the Roman supplement to an external file. + % Stack for pattern procedures: infile line /CSRName OutDot (CSR) concatstrings def /csr CSRName (w) file def @@ -206,8 +205,8 @@ QUIET not { (Writing ) print CSRName = flush } if /encoding 256 array def /patterns [ - % Patterns specific to the Roman supplement, in which - % the outlines are in an eexec section. + % Patterns specific to the Roman supplement, in which + % the outlines are in an eexec section. { (/Encoding 256 array) { pop out (/Encoding ) writestring { dup buffer readline pop @@ -216,8 +215,8 @@ QUIET not { (Writing ) print CSRName = flush } if loop { % Stack: infile dupline postdup (dup) predup pop pop exch pop - % The top element of the stack is a string beginning with - % an index and value to put into the Encoding. + % The top element of the stack is a string beginning with + % an index and value to put into the Encoding. token pop exch token pop exch pop encoding 3 1 roll put dup buffer readline pop dup (dup) search not { pop exit } if @@ -238,8 +237,8 @@ QUIET not { (Writing ) print CSRName = flush } if dup //.eexec_param_dict /eexecDecode filter } } { (dup/CharStrings ) { - % Copy the individual CharStrings to the CSR file, - % recording the lengths and offsets. + % Copy the individual CharStrings to the CSR file, + % recording the lengths and offsets. pop out (dup/CharStrings AltsysCFD3 /CharStrings get put\n) writestring /offsets 256 dict def { dup token pop % char name @@ -252,7 +251,7 @@ QUIET not { (Writing ) print CSRName = flush } if dup buffer readline pop pop % skip ND } loop - % We skipped the 'end'; skip the 'readonly put' as well. + % We skipped the 'end'; skip the 'readonly put' as well. 2 { dup token pop pop } repeat out (dup/PGOffsets ) writestring out csr fileposition write=only @@ -279,7 +278,7 @@ QUIET not { (Writing ) print CSRName = flush } if pop out (end % systemdict\n) writestring closefile } } - % Patterns for other supplements. + % Patterns for other supplements. { (pgfonts/) { { cdfromstr search not { exit } if out exch writestring pop out cdstr writestring @@ -305,7 +304,7 @@ QUIET not { (Writing ) print CSRName = flush } if (end def) search { pop pop pop exit } if (/Std) search { pop pop dup length 3 sub 3 exch getinterval - (]) search pop out ( ) writestring out exch writestring pop + (]) search pop out ( ) writestring out exch writestring pop } if pop } @@ -329,7 +328,7 @@ QUIET not { (Writing ) print CSRName = flush } if forall csr closefile - % Copy the definition of the root font. + % Copy the definition of the root font. dup buffer readstring pop out exch writestring closefile out ( @@ -337,7 +336,7 @@ setpacking ) writestring out closefile - % Remove the Mac garbage from the outline files. + % Remove the Mac garbage from the outline files. [ (COD) (CSA) ] { CDir (/) concatstrings (JIS83-1_) concatstrings @@ -345,9 +344,9 @@ out closefile exch OutDot exch concatstrings QUIET not { (Writing ) print dup = flush } if (w) file - % Stack: infile outfile + % Stack: infile outfile { 1 index buffer readstring exch - % Stack: infile outfile noteof substring + % Stack: infile outfile noteof substring 2 index exch writestring not { exit } if } loop closefile closefile |