Skip to content

Commit 0938497

Browse files
committed
Add whatsnew entry for Type42 subsetting
1 parent 37c2903 commit 0938497

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Type 42 Subsetting is now enabled for PDF/PS backends
2+
-----------------------------------------------------
3+
4+
`~matplotlib.backends.backend_pdf` and `~matplotlib.backends.backend_ps` now use
5+
a unified Type 42 font subsetting interface, with the help of `fontTools <https://fonttools.readthedocs.io/en/latest/>`_
6+
7+
Set `~matplotlib.RcParams`'s *fonttype* value as ``42`` to trigger this workflow:
8+
9+
.. code-block::
10+
11+
# for PDF backend
12+
plt.rcParams['pdf.fonttype'] = 42
13+
14+
# for PS backend
15+
plt.rcParams['ps.fonttype'] = 42
16+
17+
18+
fig, ax = plt.subplots()
19+
ax.text(0.4, 0.5, 'subsetted document is smaller in size!')
20+
21+
fig.savefig("document.pdf")
22+
fig.savefig("document.ps")

0 commit comments

Comments
 (0)