I have the same question as Error using Arial in .eps figure with extrafont package but the answers did not help me: I'm using ggplot2 and cowplot for creating figures. The journal, I want to publish in, wants an eps-file with arial as font.
I used library(extrafont)
for changing the font and loadfonts(device='postscript')
.
To save the figure I used ggsave(filename='Fig2DFH.eps')
but I get an error:
Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : family 'Arial' not included in postscript() device
According to the link above I tried to solve it with
library(showtext)
font.add('Arial', regular='arial.ttf', bold='arialbd.ttf', italic='ariali.ttf', bolditalic='arialbi.ttf')
Here I get the following error:
Error in .check.font.path(regular, "regular") :
font file not found for 'regular' type
I was wondering if I did something wrong or if I have to change something in the names as I'm working with a German PC. The font.path is correct but filenames in C:Windows/Fonts/Arial are in German. I tried to change filenames in the R-command, but it did not work.