title: Importing font and using it in ggplot
body: <p>I imported my font via:</p>
  <pre><code>font_import(paths = &quot;/Users/asuna/Desktop/&quot;,prompt = F)
  font_import()
  </code></pre>
  <p>loaded fonts:</p>
  <pre><code> loadfonts(device=&quot;postscript&quot;)
  </code></pre>
  <p>and then I try to use the font, however</p>
  <pre><code>ggplot(data.frame(df,x=c(1, 15)),  aes(x=x), aes(y=y)) + 
    stat_function(fun=h)+ geom_point(data = df, mapping = aes(x = x, y = y))+ 
    theme(text = element_text(family = &quot;Cormorant Light&quot;))+
    labs(y =&quot;Y axis&quot;, x = &quot;X axis&quot;)+ 
    ggtitle(&quot;Example text&quot;)
  </code></pre>
  <p>however, I get the following error:</p>
  <pre><code>Error in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y,  : 
    invalid font type
  In addition:
  There were 50 or more warnings (use warnings() to see the first 50)
  </code></pre>
  <p>Could you tell me what I am doing wrong?</p>
  <p>Thanks</p>