Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76b3b6e

Browse filesBrowse 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
Copy full SHA for 76b3b6e

File tree

Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed
Binary file not shown.

‎lib/matplotlib/tests/test_text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_text.py
+7Lines changed: 7 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.