.TH MFF 1 "pdc Mon. 2 Dec. 1991" "mff 2.8.2" "CONTRIBUTED PROGRAMS" .SH NAME mff \- run METAFONT and GFtoPK to create members of TeX font families (formerly called mfjob) .SH SYNOPSIS .\" .\" mff.1 - manual page for mff - pdc Fri. 28 Sept. 1990 .\" Copyright (C) 1990-1991 Damian Cugley .\" See file COPYING in the mff source for info on making copies. .\" .ds RC /mclab/pdc/lib .ds MJ /mclab/pdc/src/mff . \" **FIXME** . \" comment out above 2 lines and insert appropriate definitions . \" RC should the the the directory the system RC file is in . \" MJ should be the directory mff source is in .ie n \{\ . ds Te TeX . ds gf GFtoPK . ds mf METAFONT\} .el \{\ . ds Te T\v|0.25m|\h|-0.1m|E\v|-0.25m|X . ds gf \s-1GF\s0to\s-1PK\s0 . ds mf \s-1METAFONT\s0\} .na .B mff [ .B \-nvRS | .B \-MGTP .IR template | .B \-WCIJ .IB string = mftext .if n .RS | .B \-Z .IB dpi = modename .if t .RS | .B \-eE .IR mftext .if n .br | .B \-x | .B \-k .I factor(s) | .B \-p .I suffix .if n .br | .B \-a .I atsize(s) | .B \-s .I factor(s) | .B \-m .I magstep(s) .if n .br | .B \-wcij .I mftext | .B \-z .I modename | .B \-d .I dpi(s) | .B \-f .I file .if n .br | .B \-D | .I font ].\|.\|. .RE .LP .B mff .B \-V | .B \-h .SH CONTENTS .TP .SM DESCRIPTION .PD 0v Family matters .br What .I mff does .br Using .I mff with conventional driver files .TP .SM OPTIONS Choosing which font to create .br Parsing the suffix .br Templates .br Miscellaneous .TP .SM ENVIRONMENT .TP .SM FILES .PD .SH DESCRIPTION .I mff is a front-end to the \*(mf program (see .IR mf (1)), and is intended to be useful for creating \*(Te fonts in batches. It will run \*(mf and \*(gf (see .IR gftopk (1)) and then transfer the files to the correct directories. .SS "\*SFamily matters" .I mff supports conventions that can be used to maintain a family of fonts derived systematically from common program files. A family in this context is a group of related fonts designed together \(em for example, the Malvern family includes Malvern, Malvern bold extended and Malvern italic. .LP Instead of using one driver file for each variation within the family, a .I generic driver file named with the abbreviation of the family name (e.g., .BR ma.mf ) is read after the standard \*(mf parameter .B designsize and optionally others (such as .B weight or .BR slant ) have already been assigned values. Usually other `ad hoc' parameters are calculated from these and then the character program files read in to create the font. .LP Fonts within the family will be given names formed from the family name abbreviation, a suffix indicating the variant type and size. The size goes at the end and can contain a .RB ` p ' or .RB ` m ' standing for a decimal point (there must be a digit before the `decimal point' and also after it if it is .RB ` p '). An .RB ` m ' indicates that the size is in millimetres rather than \*(Te points. For example, .B ma35a10 is `ten-point Malvern 35 light', .B ma55a7p5 is `7.5-pt Malvern', and .B ma74a4m2 is `4.2-mm Malvern 74 bold extended italic'. These do .I not have to have separate .B .mf driver files. .SS "\*SWhat mff does" For each .I font argument, .I mff removes the suffix giving a stub that should be the family name (and usually the generic driver name). For example, .B ma74a12 would have 12\|pt design size and style suffix .BR 74a ; .B mabxi4m2 has 4.2\|mm design size and suffix .BR bxi . Then it invokes \*(mf with a first line .if t .sp 0.5v .if n .sp .RS .BI \e\|mode= modename ; .B font_size .IB size ; .IB "assignments to parameters" ; .IB "extra mf text" ; .B input .IB driver ; .B bye. .RE .if n .sp .if t .sp 0.5v The .I modename tells \*(mf what sort of device the font is being created for. The .B font_size command sets the standard \*(mf variable .B designsize (see Appendix\ F of the .IR \*(mfbook ). The `assignments to parameters' are generated from the suffix and a lookup table (see under .I Parsing the suffix below). The `extra mf text' (set with the .B \-E option) might include more .B input commands (other .B input commands can't be used before the first .B input because it would give the font the wrong name). .LP After \*(mf has been run, the \*(gf program is invoked to create the bitmap file. The .SM PK and .SM TFM files are then renamed into the user's `font area' directories and the .SM GF file is removed. .LP The tables used to translate suffixes into \*(mf code and so on are all definable using command-line options. See under the .B \-f option and .SM .B FILES below for information on defining such tables sensibly. .LP Log files will be named after the generic driver file rather than the individual fonts, so that if there are many fonts from the same family in the command line only one log file is written \(em for the last font generated. Usually this is a good thing because it slows the accumulation of useless log files. If the font is made successfully then the log file usually is not wanted and if the font fails, .I mff terminates and leaves the log file with the error message in it. .SS "\*SUsing mff with conventional driver files" To use .I mff to create a font using non-generic driver files, use the .B \-S option to supress the parsing step. .LP To use .I mff with the .BR dc / ec fonts you might try using .B \-e .BR gensize=designsize ; the .B generate command they use is equivalent to .BR input . With the Sauter fonts there is the problem that the generic driver has .RB ` b\- ' or .RB ` build\- ' prepended to it; as well as using .B \-e .B design_size=designsize you will have to use the .B \-g option to get around this (or rename the files). (I would claim that using the .B font_size macro and builtin variable .B designsize is more `obvious' and sensible than making up a new name and using that. Also, why do neither of those systems appear to take any notice of the # convention for measurements in `sharp' units?) .SH OPTIONS The large number of options is a result of the admittedly eccentric decision to make the command language used to describe how to make fonts the same as the language of the command-line options. .PP Options and .I font arguments can be intermixed; they are read in left-to-right order. A plus replacing a hyphen is used to set something back to its default value. Flags that take an argument do not take an argument when used with a .BR + . (See .IR argloop (3) for more details.) .SS "\*SChoosing which font to create" An argument named .I foo(s) below can be a list of values (the list must still form one shell word, so should not include unquoted spaces). For example a valid .I dpi(s) would be .RB ` 118,300 '. Each font creation will be performed once for each value. .TP .BI \-a " atsize(s)" This is used to calculate the scaling of following fonts to match a \*(Te .RB ` at .IR size ' specification. An .I atsize is a size which is interpreted as points or millimetres depending on whether the following font name has an .RB ` m ' in the size. When the next font name is parsed, .I mff calculates the nearest magstep (see under .BR \-m ) to the ratio .IR at-size \|/\| design-size and sets the scaling to that value. For example, if it appears as .RB ` "\-a 17 ma55a10" ', the scaling is set to magstep 3, which is 1.728, so it is equivalent to .RB ` "\-m 3 ma55a10" '. .B +a sets the scaling to 1 (same as .B +s or .BR +m ). .TP .BI \-d " dpi(s)" Sets the device for which fonts are being created. A .I dpi is the number of pixels per inch of the device, used to identify it in an table of `modenames' (see under .BR \-Z ). .B +d selects 200 DPI (the .I lowres device, which is defined in .BR plain.mf ). .TP .BI \-m " magstep(s)" Sets the magnification at which \*(mf will be run to be magstep .IR magstep , that is, 1.2 raised to the .IR magstep th power. A .I magstep is either an integer, or .B h (meaning magstephalf = sqrt(1.2) = 1.095), or .B \-h (meaning 0.913). .B +m sets the magnification to be 1.0 (same as .B +a or .BR +s ). .TP .BI \-s " scale(s)" Sets the \*(mf magnification to .IR scale . A .I scale can either be a number (possibly including a decimal point) less than 100.0, in which case it is taken as is, or over 100, in which case it is assumed to be a \*(Te .B scaled number and is divided by 1000. .B +s sets the magnification to 1.0 (same as .B +a or .BR +m ). .TP .BI \-Z " dpi=modename" Adds an entry to the `modename' table. This is used to map .I dpi values onto the \*(mf names for those devices. A modename is what goes after .RB ` \e\|mode= ' in the \*(mf command line. If a modename starts with a double-quote character, as in .ie t .sp 0.5v .el .sp .B mff \-Z \(fm500="zambo"\(fm .\|.\|. .ie t .sp 0.5v .el .sp then .RB ` \e\|smode= ' is used instead (this causes \*(mf to read a file .B zambo.mf rather than attempt to use a predefined mode \(em see Section\ 4 of Appendix\ B of the .IR \*(mfbook ). .B \-Z \- discards the `modename' table. .B +Z restores the default `modename' table (which contains only Knuth's .I lowres device \(em not very useful). .TP .BI \-z " modename" Overrides the modename derived from the `modename' table and the .I dpi value. .B +z cancels .BR \-z. .SS "\*SParsing the suffix" Names are parsed from right-to-left. After the size has been stripped off, for each of four tables of .IR suffix = mftext pairs, if there is a match between a .I suffix and the end of the stub, then the .I mftext is inserted into the \*(mf command line and the .I suffix is stripped off. The .I mftext is expected to be an assignment or equation, such as .BR weight=1.25 . (Semicolons are automatically inserted between them.) .LP The resulting stub is taken to be the family name \(em and therefore the name of the generic driver file. If it ends in a hyphen, the hyphen is removed too \(em this is for when the basename would otherwise seem to end with a suffix. For example, if .B fab was a family name, you might use .RB ` fab\-12 ' to avoid having it split as .B fa\ b\ 12 . The font created will still be called .BR fab12.tfm . (\*(Te font names should not contain hyphens.) .LP The tables are intended to provied three dimensions of `variant style' \- the .I weight (W) table gives an axis from `light' to `bold'; the .I condensedness (C) table gives an axis from `condensed' to `expanded'; and the .I italic (I) table chooses roman, italic or obliqued options. (Omitted suffixes standing for `regular'.) .LP The fourth table (J) has no fixed meaning, but might be used to select a subset of the possible characters in that style \(em for example, a full font might have programs for uppercase, lowercase, small-caps, math italic, accents, accented letters, punctuation and symbols: more than can be fitted into 256 characters. The J table might have entries for .B msy (mathematical symbols) and .B csc (caps-and-small-caps). .LP The tables are used in the order J, I, C, W; therefore they appear in the name in the order W, C, I, J. Thus .B madcicsc14 might be `fourteen-point Malvern demibold condensed italic caps-and-small-caps'. .LP The meanings of the four tables are not cast in stone, of course. .TP .BI \-W " suffix=mftext" Adds an association to table W. .B +W discards table W. .TP .BI \-w " mftext" Overrides the text derived from the W table. The parsing is still performed. .B +w cancels .BR \-w. .LP The other three tables have corresponding option letters .BR \-C , .BR \-c , .BR \-I , .BR \-J , .B \-J and .BR \-j . .TP .BI \-g " file" This overrides the deduced `generic driver file' name. For example, to use a file .B malvern.mf for the generic driver rather than .BR ma.mf , .I mff could be invoked with .B mff .B \-g .BR malvern . .B +g cancels .BR \-g . .TP .B \-S Indicates that this is a .RI fixed- S ize font \(em the .I font_size assignment is omitted from the \*(mf command line and the parsing of the W, C, I and J suffixes is not attempted. This is appropriate for standard fonts like .B cmr12 which do not have the ability to be built at different sizes. .SS \*STemplates The following four options tell .I mff how to go about installing a font. .TP .BI \-G " template" Tells .I mff how to invoke \*(gf. If this is just a hyphen, the \s-1GF\s0-to-pixel step is omitted. .B +G sets the \*(gf template to .RB ` gfto%p '. The command is broken into words at whitespace. For example, .B mff \-g \(fmgfto%p \-v\(fm .\|.\|. will use \*(gf in its verbose mode. .TP .BI \-M " template" Tells how to invoke the \*(mf program. .B +M sets the \*(mf template to be .RB ` mf '. .TP .BI \-P " template" Tells where pixel files ought to be deposited once created. A value of just a hyphen means do not rename the pixel files. If there is no .B %f in this template, then it is assumed to be the name of a directory and .B %f.%n%p (and possibly a slash) is implicitly appended to it. .B +P resets the pixel directory template to .RB ` %f.%n%p '. (On systems with unreasonably short filenames, the default suffix is .RB ` %f/%n.%p '.) .TP .BI \-T " template" Tells where .SM TFM files ought to be deposited once created. A value of just a hyphen means to not move the .SM TFM files. If there is no .B %f then .B %f.tfm is implicitly appended. .B +T resets the .SM TFM directory template to .RB ` %f.tfm '. .LP The following %-substitutions are made in templates supplied by the above commands: .RS .TP .B %% A percent sign. .TP .B %b The basename of the current font. .TP .B %d The current .I dpi value. .TP .B %D The current .I dpi value multipled by the current magnification. .TP .B %f The current .I font name. .TP .B %g the current driver file name (usually the same as .BR %b ). .TP .B %k The current .I factor times 1000 (set with .BR \-k ). .TP .B %n The current .I dpi value multipled by the current .IR factor value times the current magnification \(em e.g., when making a 300-dpi .SM PXL font, this will be 1500. .TP .B %p The pixel file suffix \(em usually .RB ` pk '. .TP .B %s The current magnification, times 1000. .TP .B %u Either .B pt or .B mm depending on which units the design size is assumed to be in. .TP .B %z The current modename \(em e.g., .RB ` CanonCX ' for a LaserWriter. .RE .SS \*SMiscellaneous .TP .B \-D Prints (`dumps') the current values of the table and other variables used to determine the \*(mf command line. .TP .BI \-e " mftext" Adds extra \*(mf text, which goes before the first .B input command. Multiple .B \-e options accumulate (semicolons are implied between them). .B +e discards the accumulated extra text. .TP .BI \-E " mftext" As .B \-e except it goes after the first .B input command. .TP .BI \-f " file" The .I file is searched for in the directories listed in the .SM MFFPATH environment variable and if a readable file is found, it is parsed for more options. An optional .B .mff suffix will be supplied if omitted. Files can be nested by using .B \-f inside a file. If the .I file is just a hyphen then the standard input stream is used. .B +f rereads the initialization files (see under .SM .B FILES below). See .IR argloop (3) for details about the format of the files. .TP .B \-h Prints a summary of the options. .TP .BI \-k " factor(s)" Uses .I factor(s) to construct pixel file names in the style of old-fashioned .SM PXL files. The number in the suffix of the pixel file is expected to be multiplied by the .IR factor ; presumably either \s-1GF\s0to\s-1PXL\s0 or something like .I mftobdf is being used which shrinks or magnifies pixel files in addition to the magnification \*(mf may be applying. This list of values is ignored unless .B \-x is used. .B +k sets the factor to 5.0 (which is correct for \s-1GF\s0to\s-1PXL\s0). .TP .BI \-n Does a dryrun \(em instead of running \*(mf and so on, the operations that would be performed are printed. Renaming of files is represented as .B mv .I oldname .IR newname , and deletion of the .SM GF file as .B rm .IR gffile . (That is, the output resembles shell commands.) .B +n cancels .BR \-n . .TP .BI \-p " suffix" Sets the suffix that will be used for pixel files. .B +p sets the pixel suffix to .RB ` pxl ' if .B \-x is in effect, .RB ` pk ' otherwise. .TP .B \-R Retain (that is, do not delete) the .SM GF file after the \*(gf step is performed. This is useful if the \*(mf commands was something like .IR echo (1) which does not actually create a .SM GF file in the first place! .TP .BI \-v Set `verbose' mode. The parsing of options and reading of files will be described in detail. (Each line will start with a .RB ` # ' so that if .B \-n is being used the result is still a reasonable shell script.) More .B \-v flags cause more verbosity (thus .B \-vv or .B \-vvv etc.). Often used but rarely useful. .B +v cancels any number of .B \-v options. .TP .BI \-V Print version number information. .TP .BI \-x Assume we are producing .SM PXL files or something equally unpleasant, and so multiply pixel file suffixes by .I factor(s) set by .B \-k above. .B +x turns off .BR \-x . .SH ENVIRONMENT .TP .SM MFFINIT This is parsed for options before the command-line is read. (Double-quotes can be used as in files.) .TP .SM MFFPATH This is a colon-separated list of directories in which files for the .B \-f option can be found. If this is not set, just the current directory is searched. .TP .SM PATH Used when searching for \*(mf and \*(gf executables. .SH FILES .TP .B \*(RC/mff.rc .PD 0v .TP .B $HOME/.mffrc .TP .B ./mff.rc .PD These files are read for options when .I mff starts up (or when requested with the .B +f option) before the .SM MFFINIT variable and the command-line arguments. The system .B mff.rc can contain system-wide setups, like the local printing devices and standard suffixes. The user `rc' files allow per-user and per-project tailoring. .TP .B \(**.mff Other files containing .I mff options. .TP .B \*(MJ/example.mffrc An example .I $\s-1HOME\s0/.mffrc file. (\*(MJ is the directory .I mff source is in). .TP .B \*(MJ/{cm,Ditko,mflogo}/* Examples of \*(mf fonts designed to be used with .IR mff . .TP .B \(**.mf \*(MF source files. .TP .IB driver .log Log file created by \*(mf. .TP .B \(**.tfm \*(Te font metric file, created by \*(mf and used by \*(Te. .TP .B \(**.\(**gf Generic font file, created by \*(mf and turned into a .SM PK file by \*(gf. .TP .B \(**.\(**pk Bitmap file, created from the .SM GF file and used by .SM DVI drivers such as .IR dvips (1). (On systems with short filenames, a file .IB driver .pk is used to store the output of \*(gf before it is renamed as per the .B \-P option.) .SH AUTHOR Damian Cugley .LP Please send bug reports, fixes and comments to \(em this is a mailing list that you can join by sending a request to me at the address . The Malvern list is also for discussion of Malvern, a \*(mf font designed to take advantage of .IR mff 's special features; it ought to be available from the same archive that .I mff was obtained from. .LP If you find .I mff amusing or useful, please send a pretty postcard to Damian Cugley, Computing Laboratory, 11\ Keble Road, Oxford, UK OX1\ 3QD. .SH "SEE ALSO" mf(1), gftopk(1), argloop(3), findfile(3) .LP The .I mff source files. .LP Donald E. Knuth, .I The \*(mfbook. Addison-Wesley, 1986. ISBN 0\-201\-13444\-6. .LP Donald E. Knuth, .I The \*(Tebook. Addison-Wesley, 1984. ISBN 0\-201\-13448\-9. .SH LIMITATIONS The command-line passed to \*(mf is limited to 512 characters. The commands supplied with .B \-M and .B \-G are limited to 1024 characters when the %-substitutions are expanded. .SH NOTES This program used to be called .I mfjob but has been renamed (as of version 2.8) to prevent confusion with the MFjob program that is part of Eberhard Mattes' em\*(Te distribution for MS-DOS and OS/2 computers. An immediate consequence is that the default suffix for files of options, and the name of `rc' files, have changed. There are also some other minor incompatible changes incorportated at the same time. .PP For information on differences for .IR gcc -based Atari ST systems, see .IR argloop (3) and .IR findfile (3). .SH BUGS It seemed sensible at the time to indicate which mode to use with the dots-per-inch value because this number is generally much shorter than the corresponding mode name. Systems with printers with the same pixel density but otherwise different characteristics require the use of .BR \-z . This system also fails to make sense if a printer has a bizarre dots-per-inch value, such as 4000/3.