title: Change font’s em size via FontForge Python bindings
body: <p>I have a small Python script to change fonts via FontForge:</p>
  
  <pre><code>import fontforge
  
  font = fontforge.open('font.ttf')
  font.em = 1000
  font.generate('font.svg')
  font.close()
  </code></pre>
  
  <p>The crucial point is</p>
  
  <pre><code>font.em = 1000
  </code></pre>
  
  <p>(I need the em size of several fonts normalized before further processing.)</p>
  
  <p>When I do this in FontForge via the GUI, the font is converted just fine: Opening, setting <code>em</code> size to <code>1000</code> (this step takes FontForge a bit of time usually), exporting as SVG. The resulting font is as expected.</p>
  
  <p>However, doing this via above script ends in mixed-up results, some glyphs not scaled, some with displaced accents, and so on.</p>
  
  <p>What might be the problem with the script? Is there anything to be done so that FontForge scales the <code>em</code> size of the font correctly prior to exporting?</p>