Make text in PDF generated matplotlib editable in Illustrator
You draw a figure with Python using matplotlib in PDF, open it in Illustrator to fix one label before the submission deadline, and the text is there but you cannot select it. Click a word and you get a cluster of tiny filled shapes that happen to be letter-shaped. The glyphs are right. The text is gone. This is not an Illustrator problem and it is not a corrupted file. It is a matplotlib default. Tested on matplotlib 3.10.8. Backend defaults do occasionally move, so check yours with matplotlib.__version__ if the behavior below does not match. Type 3 versus Type 42 The PDF specification supports several ways to embed a font. Matplotlib’s PDF backend defaults to Type 3, which defines each glyph as a small PostScript drawing procedure. A Type 3 font is a set of instructions for painting shapes. It carries no reliable mapping back to characters, so a design tool can render it faithfully and still have nothing to hand you when you click. Type 42 wraps a real TrueType font, outlines an...