Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35148a1 commit 02dee87Copy full SHA for 02dee87
1 file changed
lib/matplotlib/tests/test_text.py
@@ -95,3 +95,13 @@ def test_antialiasing():
95
# test cleanup will do it for us. In fact, if we do it here, it
96
# will turn antialiasing back off before the images are actually
97
# rendered.
98
+
99
100
+def test_afm_kerning():
101
+ from matplotlib.afm import AFM
102
+ from matplotlib.font_manager import findfont
103
104
+ fn = findfont("Helvetica", fontext="afm")
105
+ with open(fn, 'rb') as fh:
106
+ afm = AFM(fh)
107
+ assert afm.string_width_height('VAVAVAVAVAVA') == (7174.0, 718)
0 commit comments