|
27 | 27 | Matplotlib supports three font specifications (in addition to pdf 'core fonts',
|
28 | 28 | which are explained later in the guide):
|
29 | 29 |
|
30 |
| -.. table:: Type of Fonts |
31 |
| -
|
32 |
| - +--------------------------+----------------------------+----------------------------+ |
33 |
| - | Type 1 (PDF with usetex) | Type 3 (PDF/PS) | TrueType (PDF) | |
34 |
| - +==========================+============================+============================+ |
35 |
| - | One of the oldest types, | Similar to Type 1 in | Newer than previous types, | |
36 |
| - | introduced by Adobe | terms of introduction | used commonly today, | |
37 |
| - | | | introduced by Apple | |
38 |
| - +--------------------------+----------------------------+----------------------------+ |
39 |
| - | Restricted subset of | Full PostScript language, | Includes a virtual machine | |
40 |
| - | PostScript, charstrings | allows embedding arbitrary | that can execute code! | |
41 |
| - | are in bytecode | code (in theory, even | | |
42 |
| - | | render fractals when | | |
43 |
| - | | rasterizing!) | | |
44 |
| - +--------------------------+----------------------------+----------------------------+ |
45 |
| - | Supports font | Does not support font | Supports font hinting | |
46 |
| - | hinting | hinting | (virtual machine processes | |
47 |
| - | | | the "hints") | |
48 |
| - +--------------------------+----------------------------+----------------------------+ |
49 |
| - | Subsetted by code in | Subsetted via external module | |
50 |
| - | `matplotlib._type1font` | `fontTools <https://github.com/fonttools/fonttools>`__ | |
51 |
| - +--------------------------+----------------------------+----------------------------+ |
| 30 | +.. table:: Types of Fonts |
| 31 | +
|
| 32 | + +--------------------------+----------------------------+-------------------------------+ |
| 33 | + | Type 1 (PDF with usetex) | Type 3 (PDF/PS) | TrueType (PDF) / Type 42 (PS) | |
| 34 | + +==========================+============================+===============================+ |
| 35 | + | Old font types introduced by Adobe. | Newer font type introduced by | |
| 36 | + | | Apple; commonly used today. | |
| 37 | + +--------------------------+----------------------------+-------------------------------+ |
| 38 | + | Restricted subset of | Full PostScript language, | Includes a virtual machine | |
| 39 | + | PostScript, charstrings | allows embedding arbitrary | that can execute code. | |
| 40 | + | are in bytecode. | code. | | |
| 41 | + +--------------------------+----------------------------+-------------------------------+ |
| 42 | + | Supports font hinting. | Does not support font | Supports font hinting, | |
| 43 | + | | hinting. | through the virtual machine. | |
| 44 | + +--------------------------+----------------------------+-------------------------------+ |
| 45 | + | Subsetted by code in | Subsetted via external module | |
| 46 | + | `matplotlib._type1font`. | `fontTools <https://github.com/fonttools/fonttools>`__. | |
| 47 | + +--------------------------+----------------------------+-------------------------------+ |
52 | 48 |
|
53 | 49 | .. note::
|
54 | 50 |
|
|
59 | 55 |
|
60 | 56 | __ https://helpx.adobe.com/fonts/kb/postscript-type-1-fonts-end-of-support.html
|
61 | 57 |
|
62 |
| -Other font specifications which Matplotlib supports: |
63 |
| -
|
64 |
| -- Type 42 fonts (PS): |
65 |
| -
|
66 |
| - - PostScript wrapper around TrueType fonts |
67 |
| - - 42 is the `Answer to Life, the Universe, and Everything! |
68 |
| - <https://en.wikipedia.org/wiki/Answer_to_Life,_the_Universe,_and_Everything>`_ |
69 |
| - - Matplotlib uses the external library |
70 |
| - `fontTools <https://github.com/fonttools/fonttools>`__ to subset these types of |
71 |
| - fonts |
72 |
| -
|
73 |
| -- OpenType fonts: |
74 |
| -
|
75 |
| - - OpenType is a new standard for digital type fonts, developed jointly by |
76 |
| - Adobe and Microsoft |
77 |
| - - Generally contain a much larger character set! |
78 |
| - - Limited support with Matplotlib |
| 58 | +Matplotlib also provides limited support for OpenType fonts, a newer standard |
| 59 | +developed jointly by Adobe and Microsoft; such fonts generally contain a much |
| 60 | +larger character set. |
79 | 61 |
|
80 | 62 | Font subsetting
|
81 | 63 | ^^^^^^^^^^^^^^^
|
|
201 | 183 |
|
202 | 184 | A majority of this work was done by Aitik Gupta supported by Google Summer of
|
203 | 185 | Code 2021.
|
204 |
| -""" |
| 186 | +""" # noqa: E501 |
0 commit comments