title: R Sweave Computer Modern font usage
body: <p>I've installed the R packages <code>extrafont</code> and <code>fontcm</code>. Then tried to plot the data with Computer Modern font in Sweave:</p>
  
  <pre><code>&lt;&lt;test,fig=TRUE,echo=False&gt;&gt;=
  plot(na, family="CM Roman")
  @
  </code></pre>
  
  <p>But it fails with error:</p>
  
  <pre><code>&gt; grDevices::pdf.options(useDingbats = FALSE); utils::Sweave('test.Rnw', encoding='UTF-8')
  Writing to file test.tex
  Processing code chunks with options ...
   1 : echo keep.source term verbatim (test.Rnw:76)
   2 : keep.source term verbatim pdf  (label = test, test.Rnw:80)
  
  Error:  chunk 2 (label = test) 
  Error in axis(side = side, at = at, labels = labels, ...) : 
    invalid font type
  In addition: Warning messages:
  1: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  2: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  3: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  4: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  5: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  6: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  7: In axis(side = side, at = at, labels = labels, ...) :
    font family 'CM Roman' not found in PostScript font database
  Error in rle(filenames) : 'x' must be an atomic vector
  Calls: &lt;Anonymous&gt; -&gt; &lt;Anonymous&gt; -&gt; RweaveTryStop
  Execution halted
  </code></pre>
  
  <p><code>loadfonts(device="postscript")</code> shows that fonts is <code>already registered with postscriptFonts()</code></p>
  
  <p>How can I use it with Sweave?</p>