Skip to content

Fix TrueType to Type-3 font conversion #905

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

Merged
merged 5 commits into from
May 31, 2012
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move test font inside test directory
  • Loading branch information
jkseppan authored and mdboom committed May 30, 2012
commit b8cab7293a2db0fc1ff692bd3eda09beb482af17
7 changes: 6 additions & 1 deletion lib/matplotlib/tests/test_ttconv.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import matplotlib
from matplotlib.font_manager import FontProperties
from matplotlib.testing.decorators import image_comparison
import matplotlib.pyplot as plt
import os.path

@image_comparison(baseline_images=["truetype-conversion"],
extensions=["pdf", "png"])
def test_truetype_conversion():
fontname = os.path.join(os.path.dirname(__file__), 'mpltest.ttf')
fontname = os.path.abspath(fontname)
fontprop = FontProperties(fname=fontname, size=80)
matplotlib.rcParams['pdf.fonttype'] = 3
fig = plt.figure()
ax = fig.add_subplot(111)
ax.text(0, 0, "ABCDE", name="mpltest", fontsize=80)
ax.text(0, 0, "ABCDE", fontproperties=fontprop)
ax.set_xticks([])
ax.set_yticks([])