Skip to content

Commit ec72aa0

Browse files
committed
Copy-edit the "fonts in pdf and postscript" table.
Remove unnecessary info snippets e.g. re: fractal rendering (this isn't a table for font designers); merge Type 42 entry together with TrueType (they are essentially the same technology).
1 parent c80e8ae commit ec72aa0

File tree

1 file changed

+22
-40
lines changed

1 file changed

+22
-40
lines changed

galleries/users_explain/text/fonts.py

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,24 @@
2727
Matplotlib supports three font specifications (in addition to pdf 'core fonts',
2828
which are explained later in the guide):
2929
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+
+--------------------------+----------------------------+-------------------------------+
5248
5349
.. note::
5450
@@ -59,23 +55,9 @@
5955
6056
__ https://helpx.adobe.com/fonts/kb/postscript-type-1-fonts-end-of-support.html
6157
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.
7961
8062
Font subsetting
8163
^^^^^^^^^^^^^^^
@@ -201,4 +183,4 @@
201183
202184
A majority of this work was done by Aitik Gupta supported by Google Summer of
203185
Code 2021.
204-
"""
186+
""" # noqa: E501

0 commit comments

Comments
 (0)