Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| fichiers:fontes:utiliser_metafont2 [2018/05/25 21:20] – joseph.wright | 5_fichiers:fontes:utiliser_metafont [2023/11/02 16:13] (Version actuelle) – Début de traduction en français. jejust | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | --- | + | ====== |
| - | title: | + | |
| - | category: fonts | + | |
| - | tags: metafont | + | |
| - | permalink: / | + | |
| - | date: 2014-06-10 | + | |
| - | --- | + | |
| - | # Getting MetaFont to do what you want | ||
| - | MetaFont | + | MetaFont |
| - | will never need to use it& | + | mais la plupart des utilisateurs de TeX n' |
| - | rather few MetaFont | + | En effet, les systèmes |
| - | needed the font generation is done, automatically, | + | et lorsque l'usage de MetaFont est nécessaire, |
| + | pour générer les polices « à la volée ». | ||
| - | If you find you have some special requirement that the system doesn' | + | Mais si vous avez des besoins particuliers que le système ne satisfait pas, |
| - | satisfy, you need to know about MetaFont | + | vous avez intérêt à connaître |
| - | unlike | + | MetaFont, |
| - | customisation is conventionally held in a '' | + | cette personnalisation est traditionnellement conservée dans un « mode » associé au périphérique. |
| - | device. Modes are commonly defined using the `mode_def` | + | Les modes sont généralement définis à l'aide de la convention |
| - | convention | + | (voir [[1_generalites: |
| - | (see [TeX-related books](/ | + | Votre distribution |
| - | distribution | + | contenant tous les '' |
| - | a file, conventionally called `local.mf`, containing all the | + | la collection de modes de Karl Berry ('' |
| - | `mode_def`s you will be using. In the unlikely event that | + | (elle peut être utilisée comme '' |
| - | `local.mf` doesn't already exist, Karl Berry's collection of | + | Les paramètres des nouveaux périphériques de sortie sont ajoutés à '' |
| - | modes (`modes.mf`) is a good starting | + | |
| - | (it can be used as a `local.mf` without | + | |
| - | modern implementation of MetaFont). | + | |
| - | Settings for new output devices are added to `modes.mf` as they | + | |
| - | become available. | + | |
| - | Now create | + | Now create a '' |
| - | a `plain` base file using `mf` (in '' | + | '' |
| - | mode), | + | |
| - | ```latex | + | < |
| % mf -ini | % mf -ini | ||
| This is METAFONT... | This is METAFONT... | ||
| Ligne 44: | Ligne 33: | ||
| Beginning to dump on file plain... | Beginning to dump on file plain... | ||
| (output) | (output) | ||
| - | ``` | + | </ |
| - | This will create a base file named `plain.base` (or something | + | This will create a base file named '' |
| - | similar; for example, it will be `PLAIN.BAS` on MS-DOS | + | similar; for example, it will be '' |
| systems). | systems). | ||
| - | your system, and run `texhash` as necessary. | + | your system, and run '' |
| Now you need to make sure MetaFont loads this new base when it starts up. If | Now you need to make sure MetaFont loads this new base when it starts up. If | ||
| - | MetaFont loads the `plain` base by default on your system, then you' | + | MetaFont loads the '' |
| - | ready to go. Under Unix (using the default TeX Live (and earlier) | + | ready to go. Under Unix (using the default TeX Live (and earlier) |
| distributions this does indeed happen, but we could for instance | distributions this does indeed happen, but we could for instance | ||
| - | define a command | + | define a command |
| - | <sup class=" | + | which executes |
| - | | + | style '' |
| - | | + | |
| - | </ | + | |
| - | which executes | + | |
| - | style `mf & lain`) which loads the `plain` base | + | |
| - | file. | + | |
| The usual way to create a font with MetaFont (with an appropriate base | The usual way to create a font with MetaFont (with an appropriate base | ||
| - | file loaded) is to start MetaFont' | + | file loaded) is to start MetaFont' |
| - | line | + | < |
| - | ```latex | + | |
| \mode=< | \mode=< | ||
| - | ``` | + | </ |
| - | in response to the `**` prompt or on the MetaFont command line. (If | + | in response to the '' |
| - | `<mode name>` is unknown or omitted, the mode defaults to | + | '' |
| - | '' | + | "proof" |
| - | `<font file name> | + | '' |
| - | The `< | + | The '' |
| - | '' | + | "magstep" |
| - | multiply a base size by `1.2`, so for a base size of | + | multiply a base size by '' |
| - | `10`, `magstep 1` is `12`, `magstep 2` is | + | '' |
| - | `14.4` | + | '' |
| - | If `mag=< | + | If '' |
| - | is `1` (`magstep 0`). For example, to generate | + | is '' |
| - | `cmr10` at `12pt` for an Epson, | + | '' |
| printer you might type | printer you might type | ||
| - | ```latex | + | |
| + | < | ||
| mf \mode=epson; | mf \mode=epson; | ||
| - | ``` | + | </ |
| - | Note that under Unix the ` ` and `;` | + | Note that under Unix the '' |
| characters must usually be quoted or escaped, so this would typically | characters must usually be quoted or escaped, so this would typically | ||
| look something like | look something like | ||
| - | ```latex | + | |
| - | | + | < |
| - | ``` | + | |
| + | </ | ||
| If you need a special mode that isn't in the base, you can put its | If you need a special mode that isn't in the base, you can put its | ||
| - | commands in a file (e.g., | + | commands in a file (e.g., |
| - | fly with the `\smode` command. | + | fly with the '' |
| - | `cmr10.300gf` for an LN03 printer, using the file | + | '' |
| - | ```latex | + | |
| + | < | ||
| % This is ln03.mf as of 1990/02/27 | % This is ln03.mf as of 1990/02/27 | ||
| % mode_def courtesy of John Sauter | % mode_def courtesy of John Sauter | ||
| Ligne 101: | Ligne 87: | ||
| fontmaking: | fontmaking: | ||
| tracingtitles: | tracingtitles: | ||
| - | pixels_per_inch:=300; | + | pixels// |
| blacker: | blacker: | ||
| fillin: | fillin: | ||
| o_correction: | o_correction: | ||
| - | ``` | + | </ |
| - | (note the absence of the `mode_def` and `enddef` | + | (note the absence of the '' |
| commands), you would type | commands), you would type | ||
| - | ```latex | + | |
| + | < | ||
| mf \smode=" | mf \smode=" | ||
| - | ``` | + | </ |
| This technique isn't one you should regularly use, but it may | This technique isn't one you should regularly use, but it may | ||
| prove useful if you acquire a new printer and want to experiment with | prove useful if you acquire a new printer and want to experiment with | ||
| Ligne 118: | Ligne 105: | ||
| Other sources of help are discussed in our list of | Other sources of help are discussed in our list of | ||
| - | [MetaFont and MetaPost Tutorials](/FAQ-mfptutorials). | + | [[1_generalites: |
| + | |||
| + | |||
| + | ----- | ||
| + | //Source:// [[faquk>FAQ-useMF|Getting MetaFont to do what you want]] | ||
| + | {{htmlmetatags> | ||
| + | metatag-og: | ||
| + | metatag-og: | ||
| + | }} | ||

