Skip to content

Commit 76b3b6e

Browse files
committed
Test for kerning in PDF output with type 42 font
This commit adds an image comparison test to ensure that the text in a type 42 font has proper kerning in the PDF output.
1 parent b7d0591 commit 76b3b6e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Binary file not shown.

lib/matplotlib/tests/test_text.py

+7
Original file line numberDiff line numberDiff line change
@@ -741,3 +741,10 @@ def test_parse_math():
741741
ax.text(0, 0, r"$ \wrong{math} $", parse_math=True)
742742
with pytest.raises(ValueError, match='Unknown symbol'):
743743
fig.canvas.draw()
744+
745+
746+
@image_comparison(['text_pdf_font42_kerning.pdf'], style='mpl20')
747+
def test_pdf_font42_kerning():
748+
plt.rcParams['pdf.fonttype'] = 42
749+
plt.figure()
750+
plt.figtext(0.1, 0.5, "ATAVATAVATAVATAVATA", size=30)

0 commit comments

Comments
 (0)