title: How do I generate a stroked font using python-fontforge
body: <p>I'm using python/fontforge to convert a CAD font to Truetype so that I can integrate it with SVG.</p>
  <pre><code> import fontforge
   font=fontforge.font()
   font.strokedfont=1
   char=font.createChar(65)
   char.stroke(&quot;circular&quot;,5)
   pen=font[65].glyphPen()
   pen.moveTo(26,102)
   pen.lineTo(26,204)
   pen.lineTo(128,409)
   pen.lineTo(231,204)
   pen.lineTo(231,102)
   pen.endPath()
   pen.moveTo(26,204)
   pen.lineTo(231,204)
   pen.endPath()
   char.width=235
   font.generate('/tmp/testfont.ttf')
  </code></pre>
  <p>This gives me the letter &quot;Capital A&quot;, but the font is filled in.</p>
  <p>I'm expecting to see a vertical stroked line from (26,102) up to (26,204), rising to the apex at (128,409), falling to (231,204) and dropping vertically to (231,102). Then a horizontal stroke from (26,204) to (231,204).</p>
  <p>Instead I have a blacked-out shape.</p>
  <p><a href="https://i.stack.imgur.com/8UIrw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8UIrw.png" alt="blacked out shape" /></a>
  <a href="https://i.stack.imgur.com/XVvB3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XVvB3.png" alt="editor showing the lines defining the blacked out shape" /></a></p>
  <p>Obviously, <code>pen.endPath()</code> is not leaving the path open as expected and <code>charstroke(&quot;circular&quot;,5)</code> is not setting the path's thickness.</p>
  <p>Can anyone tell me what I'm doing wrong?</p>