title: Rscript invalid font type in ggplot
body: <p>I have a short script that produces a ggplot using a non-standard font (see MWE below).</p>
  <p>If I run the script in R (i.e., RStudio) everything works as expected and I see no error.</p>
  <p>When I run the script using the command line and <code>Rscript</code> I get the error:</p>
  <pre><code>Error in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y,  : 
    invalid font type
  Calls: &lt;Anonymous&gt; ... drawDetails -&gt; drawDetails.text -&gt; grid.Call.graphics
  In addition: There were 50 or more warnings (use warnings() to see the first 50)
  Execution halted
  </code></pre>
  <p>I execute the script with <code>Rscript myscript.R</code>, the contents of the script is</p>
  <pre><code>library(ggplot2)
  theme_set(theme_light(base_family = &quot;LM Roman 10&quot;))
  # if &quot;base_family&quot; is left empty, everything works with Rscript
  
  p &lt;- ggplot(mtcars, aes(x = wt, y = mpg)) +
    geom_point()
  
  ggsave(&quot;myplot.pdf&quot;, p, device = cairo_pdf)
  </code></pre>
  <p>I use Ubuntu 18.04.1 with R 3.5.1. I also updated all my packages.</p>
  <p>When I use <code>R CMD BATCH myscript.R</code> everything works as well.</p>
  <h2>Temporary Solution</h2>
  <p>If you have the same issue (as of now I haven't been able to solve it), I have reverted to using <code>R CMD BATCH --vanilla myscript.R</code>.</p>