home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fonts 1
/
freshfonts1.bin
/
programs
/
amiga
/
pastex
/
mf
/
rexx
/
maketexfontset.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-10-31
|
13KB
|
439 lines
/* MakeTeXFontSet.rexx */
Version = '1.0'
Author = ' Ulrich Wisser';
/*
Date : 13-Jul-92
Please send new features and bugreports to
Author : Ulrich Wisser
Heerstr. 125
53111 Bonn
Germany
WARNING!!!
This script will call METAFONT 7 times per font and driver and
another 22 times per font for ShowDVI.
Assuming that METAFONT will only need 30 minutes per call one font
will take 3.5 hours to create for one driver and 11 hours for
ShowDVI.
THIS MEANS:
TO CREATE ONE FONT FOR ONE PRINTER AND ShowDVI WILL TAKE
AT LEAST 14.5 HOURS (FOR SURE IT WILL BE MORE!)
USE THIS SCRIPT ONLY WHEN NECESSARY!
NEVER SET CALLMF TO MakeTeXFontSet.rexx because it does't understand how to
create single fonts (nor does it understand the parameters).
!!!!!!!!!!!!!!!!!!!
HOW THIS ALL WORKS!
First install MakeBatch.rexx and MakeTeXFont.rexx as described in their
installation guide. When you "familiar" with these scripts and you really
want to create a full fontset call MakeTexFontSet.rexx. It is easy to
use. The only optional argument are a list of fonts to create.
You will be asked everything by the script. The fonts for ShowDVI are
handeled seperatly (see SHOWDVI section).
SIZES
For all modes (resolutions) the following magsteps are created:
magstep 0
magstep 0.5
magstep 1
magstep 2
magstep 3
magstep 4
magstep 5
These are the "normal" sizes which are defined by TeX's \magstep command.
The resolutions should be found in any correct installed TeX enviroment.
SHOWDVI
The following table shows the DPI sizes of the magsteps:
| ShowDVI Resolution |
magstep | 44 | 83 | 91 | 100 | 120 |
---------------------------------------------
0 | 44 | 83 | 91 | 100 | 120 |
0.5 | 48 | 91 | 100 | 110 | 131 |
1 | 53 | 100 | 109 | 120 | 144 |
2 | 63 | 120 | 131 | 144 | 173 |
3 | 76 | 143 | 157 | 173 | 207 |
4 | 91 | 172 | 189 | 207 | 249 |
5 | 109 | 207 | 226 | 249 | 299 |
Some entries have the same DPI size so they will not be
calculated twice.
The following table shows which DPI sizes will be really
created:
| ShowDVI Resolution |
magstep | 44 | 83 | 91 | 100 | 120 |
---------------------------------------------
0 | 44 | 83 | 91 | 100 | 120 |
0.5 | 48 | | | 110 | 131 |
1 | 53 | | 109 | | 144 |
2 | 63 | | | | 173 |
3 | 76 | 143 | 157 | | 207 |
4 | | 172 | 189 | | 249 |
5 | | | 226 | | 299 |
USER CONFIGURATION
This configuration should statisfy your "normal" needs. If you
need any other magsteps (or magnification) follow this instruction.
If you have any other modes for it just append another array entry.
If you want additional magsteps you must change the array magmult.
ATTENTION this will need changes to array SDVI.
This additionell magsteps will be generated for all other modes as well.
magmult holds all magstep information:
magmult.0 number of entries in array magmult
magmult.i.str holds the magstep
magmult.i.num the relating number 1.2^(magmult.i.str)
SDVI holds all information relating to ShowDVI
SDVI.pkdir dir to copy pk to (needs trailing '/')
SDVI.ModesAnz number of modes for ShowDVI
SDVI.i holds all information relating to one mode
SDVI.i.name name of the mode (used by METAFONT)
SDVI.i.xdpi horizontal resolution
SDVI.i.ydpi vertical resolution
SDVI.i.Mag holds all information relating to magsteps for i-th mode
SDVI.i.Mag.Anz number of magsteps to create
SDVI.i.Mag.j index to magmult (e.g. SDVI.i.Mag.j = 1 means magstep 0)
*/
NUMERIC DIGITS 12 /* Needed to calculte correct DPI number */
magmult.0 = 7 /* number of saved magsteps */
magmult.num.1 = 1.0
magmult.str.1 = "0"
magmult.num.2 = 1.09544511501
magmult.str.2 = "0.5"
magmult.num.3 = 1.2
magmult.str.3 = "1"
magmult.num.4 = 1.44
magmult.str.4 = "2"
magmult.num.5 = 1.728
magmult.str.5 = "3"
magmult.num.6 = 2.0736
magmult.str.6 = "4"
magmult.num.7 = 2.48832
magmult.str.7 = "5"
SDVI.pkdir = 'MF:SDVI/';
SDVI.ModeAnz = 5;
SDVI.1.name = 'FourFour';
SDVI.1.xdpi = 44;
SDVI.1.ydpi = 44;
SDVI.1.Mag.Anz = 5;
SDVI.1.Mag.1 = 1; /* index to magmult */
SDVI.1.Mag.2 = 2;
SDVI.1.Mag.3 = 3;
SDVI.1.Mag.4 = 4;
SDVI.1.Mag.5 = 5;
SDVI.2.name = 'EightThree';
SDVI.2.xdpi = 83;
SDVI.2.ydpi = 83;
SDVI.2.Mag.Anz = 3;
SDVI.2.Mag.1 = 1;
SDVI.2.Mag.2 = 5;
SDVI.2.Mag.3 = 6;
SDVI.3.name = 'NineOne';
SDVI.3.xdpi = 91;
SDVI.3.ydpi = 91;
SDVI.3.Mag.Anz = 5;
SDVI.3.Mag.1 = 1;
SDVI.3.Mag.2 = 3;
SDVI.3.Mag.3 = 5;
SDVI.3.Mag.4 = 6;
SDVI.3.Mag.5 = 7;
SDVI.4.name = 'OneZeroZero';
SDVI.4.xdpi = 100;
SDVI.4.ydpi = 100;
SDVI.4.Mag.Anz = 2;
SDVI.4.Mag.1 = 1;
SDVI.4.Mag.2 = 2;
SDVI.5.name = 'OneTwoZero';
SDVI.5.xdpi = 120;
SDVI.5.ydpi = 120;
SDVI.5.Mag.Anz = 7;
SDVI.5.Mag.1 = 1;
SDVI.5.Mag.2 = 2;
SDVI.5.Mag.3 = 3;
SDVI.5.Mag.4 = 4;
SDVI.5.Mag.5 = 5;
SDVI.5.Mag.6 = 6;
SDVI.5.Mag.7 = 7;
/* TRACE RESULTS */
SIGNAL ON BREAK_C;
SIGNAL ON BREAK_D;
modefilename = "mf:config/modes"
batchname = "mf:MakeTeXFont.sh";
SAY;
SAY "MakeTeXFont.rexx Version "Version" by "Author".";
SAY;
IF ~exists(batchname) THEN DO
IF ~OPEN(batchfile,batchname,'W') THEN DO
SAY "MakeBatch: Could not create "batchname" !";
EXIT 10
END
ELSE DO
CALL WRITELN(batchfile,";# Batchfile for font generation");
IF CLOSE(batchfile) THEN DO
'protect 'batchname' ADD s';
SAY "MakeBatch: Batchfile "batchname" created.";
END
ELSE DO
SAY "MakeBatch: Error during creation of "batchname" !";
EXIT 10;
END
END
END
MakeFontScript = 'MF:rexx/MakeTeXFont.rexx';
OPTIONS PROMPT 'Should I call 'MakeFontScript' (Y/n) ? ';
DO UNTIL yn='Y'|yn='N'
PARSE UPPER PULL yn;
IF yn = '' THEN yn = 'Y';
END;
IF yn = "N" THEN DO
OPTIONS PROMPT "Please enter scriptname to use or RETURN to cancel:";
PARSE PULL MakeFontScript;
END;
DROP yn;
IF MakeFontScript = '' THEN DO
SAY "Sorry, no script for fontcreation.";
EXIT;
END;
IF UPPER(RIGHT(MakeFontScript, 5)) = '.REXX' THEN
MakeFontScript = LEFT(MakeFontScript, Length(MakeFontScript)-5);
PARSE ARG Fontline
Fonts.Anz = WORDS(Fontline)
DO i=1 TO Fonts.Anz
Fonts.i = WORD(Fontline, i);
END; /* DO i */
IF Fonts.Anz = 0 THEN DO
SAY "You didn't supply a fontname as argument!";
SAY
OPTIONS PROMPT 'DO you want to enter fontnames (Y/n) ? '
DO UNTIL yn='Y'|yn='N'
PARSE UPPER PULL yn;
IF yn='' THEN yn = 'Y';
END;
END /* IF Fonts.Anz = 0 */
ELSE DO
SAY "I found the following fonts to create: ";
DO i = 1 TO Fonts.Anz
SAY ' 'Fonts.i;
END;
SAY
OPTIONS PROMPT 'DO you want to enter some more fontnames (y/N) ? '
DO UNTIL yn='Y'|yn='N'
PARSE UPPER PULL yn;
IF yn='' THEN yn = 'N';
END;
END; /* ELSE */
IF yn = 'Y' THEN DO
SAY 'ENTER for no more fonts!';
inp = 'BlaBla';
DO UNTIL inp = ''
OPTIONS PROMPT 'Please enter 'Fonts.Anz+1'. font : ';
PARSE PULL inp;
IF inp ~= '' THEN DO
Fonts.Anz = Fonts.Anz + 1;
i = Fonts.Anz;
Fonts.i = inp;
END;
END;
END; /* IF yn */
IF Fonts.Anz = 0 THEN DO
SAY 'Sorry, no FONTS ==> NOTHING TO DO';
EXIT;
END;
DO i=1 TO Fonts.Anz
IF UPPER(RIGHT(Fonts.i, 3)) = '.MF' THEN
Fonts.i = LEFT(Fonts.i, LENGTH(Fonts.i)-3);
END;
DPISTR = '';
DO i=1 TO SDVI.ModeAnz
DPISTR= DPISTR' 'SDVI.i.xdp