title: Parse Hershey font .jhf to json using python or javascript
body: <p>I ve been searching the web for a solution but I found nothing that is within my skills. How would you transform these Hershey Font .jhf files <a href="http://emergent.unpythonic.net/software/hershey" rel="nofollow noreferrer">emergent.unpythonic.net/software/hershey</a> to JSON using python or javascript. Creating something like:</p>
  <pre><code>[
      {
          asciival:26,
          points:[[5,-5],[4,7,8],[6,8,7]]
      },
      {
          asciival:27,
          points:[[5,-3],[4,7,33],[6,32,7]]
      },
  (…)
  ]
  </code></pre>
  <p>I know there is a <a href="https://stackoverflow.com/questions/8042840/parsing-the-hershey-font-format">question here</a> but this is not enough for me to understand the system.</p>
  <h2>Edit1</h2>
  <p>I already found the descriptions <a href="http://paulbourke.net/dataformats/hershey/" rel="nofollow noreferrer">paulbourke.net/dataformats/hershey/</a> sean pointed out in the comments.</p>
  <blockquote>
  <p>As an example consider the 8th symbol
  8  9MWOMOV RUMUV ROQUQ<br />
  It has 9 coordinate pairs (this includes the left and right position).<br />
  The left position is 'M' - 'R' = -5<br />
  The right position is 'W' - 'R' = 5<br />
  The first coordinate is &quot;OM&quot; = (-3,-5)<br />
  The second coordinate is &quot;OV&quot; = (-3,4)<br />
  Raise the pen &quot; R&quot;<br />
  Move to &quot;UM&quot; = (3,-5)<br />
  Draw to &quot;UV&quot; = (3,4)<br />
  Raise the pen &quot; R&quot;<br />
  Move to &quot;OQ&quot; = (-3,-1)<br />
  Draw to &quot;UQ&quot; = (3,-1)<br />
  Drawing this out on a piece of paper will reveal it represents an 'H'.&gt;</p>
  </blockquote>
  <p>I tried to make sense out of this, but where do the values come from?<br />
  For example why is UM (3,-5)?</p>
  <h2>Edit2</h2>
  <p>I found <a href="http://www.batbox.org/font.html" rel="nofollow noreferrer">this java class</a></p>