Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Missing kerning in PDFs with Type 42 font #20614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sauerburger opened this issue Jul 9, 2021 · 0 comments · Fixed by #20615
Closed

Missing kerning in PDFs with Type 42 font #20614

sauerburger opened this issue Jul 9, 2021 · 0 comments · Fixed by #20615
Milestone

Comments

@sauerburger
Copy link
Member

Bug report

Bug summary

Text in PDF files created with the rcParams["pdf.fonttype"] = 42 setting does not have any kerning. This can lead to text overflowing the legend box.

Code for reproduction

import matplotlib.pyplot as plt
from matplotlib import rcParams

rcParams["pdf.fonttype"] = 42

plt.plot([0, 1], [0, 1], label="Hello AVATAVATAVATAVATAVATAVAT")
plt.legend()

plt.savefig("kern42.pdf")

Actual outcome
kern42_pdf
kern42.pdf

Expected outcome
kern42_pdf
kern42.pdf

Matplotlib version

  • Operating system: Debian 11
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.4.2
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg (PS I assume)
  • Python version: 3.9.2
  • I've installed Matplotlib with pip in a virtualenv
This was referenced Jul 9, 2021
@QuLogic QuLogic added this to the v3.5.0 milestone Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants