Looking into this a bit, I see that the problem is showtext package.
This creates editable text:
library(ggplot2)
p <- ggplot(iris,aes(Sepal.Length,Petal.Length))+
geom_point()+
geom_text(aes(label=Species))+
labs(title="Iris dataset")+
theme_bw()
ggsave("iris.pdf",p)
When using a custom font using showtext, fonts are converted to shapes.
library(showtext)
font_add_google("Lato")
showtext_auto()
p1 <- p+theme_bw(base_family = "Lato")
ggsave("iris-showtext.pdf",p1)