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/06/03 14:24] – 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: / | + | |
| - | redirect_from: | + | |
| - | --- | + | |
| - | MetaFont allows you to create your own fonts, and most TeX users | ||
| - | will never need to use it& | ||
| - | rather few MetaFont fonts of any significance, | ||
| - | needed the font generation is done, automatically, | ||
| - | If you find you have some special requirement that the system doesn' | + | MetaFont |
| - | satisfy, you need to know about MetaFont in rather more detail. | + | mais la plupart des utilisateurs de TeX n' |
| - | unlike | + | En effet, les systèmes |
| - | customisation is conventionally held in a " | + | et lorsque l'usage de MetaFont est nécessaire, il est appelé automatiquement |
| - | device. Modes are commonly defined using the `mode_def` | + | pour générer les polices « à la volée ». |
| - | convention described on page& | + | |
| - | (see [TeX-related books](FAQ-other-books)). | + | |
| - | distribution should provide | + | |
| - | a file, conventionally called `local.mf`, containing all the | + | |
| - | `mode_def`s you will be using. In the unlikely event that | + | |
| - | `local.mf` doesn't already exist, Karl Berry' | + | |
| - | modes (`modes.mf`) is a good starting point | + | |
| - | (it can be used as a `local.mf` without modification in a | + | |
| - | modern implementation of MetaFont). | + | |
| - | Settings for new output devices are added to `modes.mf` as they | + | |
| - | become available. | + | |
| - | Now create | + | Mais si vous avez des besoins particuliers que le système ne satisfait pas, |
| - | a `plain` base file using `mf` (in " | + | vous avez intérêt à connaître MetaFont plus en détail. |
| - | mode), | + | MetaFont, contrairement à TeX, nécessite une personnalisation pour chaque périphérique de sortie: |
| - | ```latex | + | cette personnalisation est traditionnellement conservée dans un « mode » associé au périphérique. |
| + | Les modes sont généralement définis à l'aide de la convention '' | ||
| + | (voir [[1_generalites: | ||
| + | Votre distribution est censée fournir un fichier, généralement appelé '' | ||
| + | contenant tous les '' | ||
| + | la collection de modes de Karl Berry ('' | ||
| + | (elle peut être utilisée comme '' | ||
| + | Les paramètres des nouveaux périphériques de sortie sont ajoutés à '' | ||
| + | |||
| + | Now create a '' | ||
| + | '' | ||
| + | |||
| + | < | ||
| % mf -ini | % mf -ini | ||
| This is METAFONT... | This is METAFONT... | ||
| Ligne 42: | 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 |
| - | which executes | + | which executes |
| - | style `mf & lain`) which loads the `plain` base | + | style '' |
| - | file. | + | |
| - | + | ||
| - | > & | + | |
| - | > On the grounds that a command `plain` could be misconstrued | + | |
| - | > as a reference to Plain TeX. | + | |
| | | ||
| 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 | + | '' |
| " | " | ||
| - | `<font file name> | + | '' |
| - | The `< | + | The '' |
| " | " | ||
| - | 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 | + | |
| + | < | ||
| mf " | mf " | ||
| - | ``` | + | </ |
| 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 99: | 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 116: | 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: | ||
| + | }} | ||

