Closed
Description
Bug report
Bug summary
The combination of Type 42 font, STIX math font and EPS output format leads to broken output files.
Code for reproduction
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams["ps.fonttype"] = 42
rcParams["mathtext.fontset"] = "stix"
plt.text(0.5, 0.5, "Mass $m$")
plt.savefig("broken.eps")
Actual outcome
A broken EPS that does not load in evince or okular.
broken.zip
One can "fix" this EPS file with
sed -i 's/000100000006/000100000006000000000000/' broken.eps
Expected outcome
A working EPS with containing the axes and "Mass m"
Matplotlib version
- Operating system: Debian 11
- Matplotlib version (
import matplotlib; print(matplotlib.__version__)
): 3.4.2 - Matplotlib backend (
print(matplotlib.get_backend())
): TkAgg (ps?) - Python version: 3.9.2
- Installed Matplotlib with pip in a virtualenv
- The problem persists even with Type42 subsetting in PS/PDF #20391 merged