title: Get computed font-family in JavaScript
body: <p>This is a followup to <a href="https://stackoverflow.com/questions/1955048/get-computed-font-size-for-dom-element-in-js">this question</a>.</p>
  
  <p>I am working on a component for the <a href="http://en.wikipedia.org/wiki/CKEditor" rel="nofollow noreferrer">CKEditor</a>, a tweaked version of the font drop-down menus that always display the currently selected font family / size values, no matter where they were defined, using <code>computedStyle</code> and consorts. </p>
  
  <p>As you can see in the other question, determining the font size works cross-browser now. Now I am having trouble working with the <code>fontFamily</code> attribute. My generic "computed style" function returns only the full font string that was defined, e.g.</p>
  
  <pre><code>Times New Roman, Georgia, Serif
  </code></pre>
  
  <p>What I need, in order to match the setting against the entries in the font family dropdown, is a <strong>fixed font name</strong> of the <strong>actual font</strong> of the DOM element I am checking. </p>
  
  <p>Can this be done somehow, at least for the most common web fonts?</p>