Skip to content

Commit 5999170

Browse files
committed
Reword subset points, add AFM downsides
1 parent 3d8e5b2 commit 5999170

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

doc/users/fonts.rst

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ In practice, there are 3 types Matplotlib supports (in addition to
2525
* - These fonts support font hinting
2626
- Do not support font hinting
2727
- Hinting supported (virtual machine processes the "hints")
28-
* - Difficult to subset!
29-
- Easy to subset!
30-
- Very hard to subset!
28+
* - Non-subsetted through Matplotlib
29+
- Subsetted via external module `ttconv <https://github.com/sandflow/ttconv>`_
30+
- Subsetted via external module `fonttools <https://github.com/fonttools/fonttools>`_
3131

3232
NOTE: Adobe will disable support for authoring with Type 1 fonts in
3333
January 2023. `Read more here. <https://helpx.adobe.com/fonts/kb/postscript-type-1-fonts-end-of-support.html>`_
@@ -38,7 +38,8 @@ Special Mentions
3838

3939
- PostScript wrapper around TrueType fonts
4040
- 42 is the `Answer to Life, the Universe, and Everything! <https://en.wikipedia.org/wiki/Answer_to_Life,_the_Universe,_and_Everything>`_
41-
- Very hard to subset!
41+
- Matplotlib uses an external library called `fonttools <https://github.com/fonttools/fonttools>`_
42+
to subset these types of fonts
4243

4344
- OpenType fonts:
4445

@@ -65,18 +66,16 @@ goal is to find out *which* glyphs are required for a certain array of
6566
characters, and embed only those within the output.
6667

6768
.. note::
68-
The role of subsetter really shines when we encounter characters like `ä`
69+
The role of subsetter really shines when we encounter characters like **ä**
6970
(composed by calling subprograms for **a** and **¨**); since the subsetter
7071
has to find out *all* such subprograms being called by every glyph included
71-
in the subset, and since there is almost no consistency within multiple
72-
different backends and the types of subsetting, this is a generally difficult
73-
problem!
72+
in the subset, this is a generally difficult problem!
7473

7574
Luckily, Matplotlib uses a fork of an external dependency called
7675
`ttconv <https://github.com/sandflow/ttconv>`_, which helps in embedding and
7776
subsetting stuff. (however, recent versions have moved away from ttconv to pure
7877
Python for certain types: for more details visit
79-
`these <https://github.com/matplotlib/matplotlib/pull/18370>` ; `links <https://github.com/matplotlib/matplotlib/pull/18181>`)
78+
`these <https://github.com/matplotlib/matplotlib/pull/18370>`_, `links <https://github.com/matplotlib/matplotlib/pull/18181>`_)
8079

8180
| *Type 1 fonts are still non-subsetted* through Matplotlib. (though one will encounter these mostly via *usetex*/*dviread* in PDF backend)
8281
| **Type 3 and Type 42 fonts are subsetted**, with a fair amount of exceptions and bugs for the latter.
@@ -111,3 +110,11 @@ This is especially helpful to generate *really lightweight* documents.::
111110
.. note::
112111
These core fonts are limited to PDF and PS backends only; they can not be
113112
rendered in other backends.
113+
114+
Another downside to this is that while the font metric are standardized,
115+
different PDF viewer applications will have different fonts to render these
116+
metrics. In other words, the **output might look different on different
117+
viewers**, as well as (let's say) Windows and Linux, if Linux tools included
118+
free versions of the proprietary fonts.
119+
120+
This also violates the *what-you-see-is-what-you-get* feature of Matplotlib.

0 commit comments

Comments
 (0)