home *** CD-ROM | disk | FTP | other *** search
- /*
- ** AREXX $VER: CreateMagBatch 1.0 (13.05.94)
- **
- ** Georg Hessmann (hessmann@informatik.uni-hamburg.de)
- **
- **
- ** CreateMagBatch
- **
- ** Create a command batchfile for a given list of fonts
- ** and a given resolution.
- **
- ** Arguments: fontlist dpi hbasedpi vbasedpi pkdir
- **
- ** fontlist : file with one font per line
- ** dpi : create fonts with this resolution
- ** hbasedpi :
- ** vbasedpi : use this to determine, which MF mode should be used
- ** (see MF:config/modes)
- ** pkdir : target directory
- **
- **
- **
- ** HISTORY:
- **
- ** 1.0: Wrote the script.
- ** Georg Hessmann (13.05.94)
- **
- */
-
- parse arg fontlist dpi hbasedpi vbasedpi pkdir .
-
- SIGNAL ON ERROR
- SIGNAL ON FAILURE
- SIGNAL ON BREAK_C
- SIGNAL ON BREAK_D
-
-
- /* open the fontlist file */
- IF ~open('flist', fontlist, 'read') THEN DO
- say "Can't find file "fontlist"!"
- exit 10
- END
-
-
- /* open the command file */
- IF ~open('commfile', "RAM:MagBatch.sh", 'write') THEN DO
- say "Can't open file "RAM:MagBatch.sh"!"
- exit 10
- END
-
-
- /* create a command-list for all fonts */
- DO UNTIL eof('flist')
- line = readln('flist')
- line = strip(translate(line, '', '2009'X)) /* a space and a tab */
- font = word(line,1)
-
- IF font ~= "" THEN DO
- fullfont = pkdir||font"."dpi"pk"
- IF ~exists(fullfont) THEN DO
- comm = "rx MF:rexx/MakeTeXFont" font dpi hbasedpi vbasedpi "CreateMag" font"."dpi"pk" pkdir
- dummy = writeln('commfile',comm)
- END
- END
- END
-
- dummy = close('commfile')
- dummy = close('flist')
-
- address command 'protect RAM:MagBatch.sh add s'
-
- EXIT 0
-
- /*---------------------------------*/
-
-
- BREAK_C:
- BREAK_D:
- ERROR:
- FAILURE:
- EXIT 5
-