I want to generate R-Diagrams using a special font, namely Cormorant-Garamond-Light (Cormorant-Light is also possible). The problem is that it works with every other font, but with this one, all spaces are just ignored.
library(ggplot2)
library(extrafont)
data = data.frame(read.table(file="PATH/TO/FILE"))
p = ggplot(data = data, aes(x = data[1], y = data[2]))
p = p + xlab("Time t/s")
p = p + ylab("Temperature T/°C")
p = p + theme(text = element_text(family = "Cormorant Garamond Light"))
After compiling, there is a warning which contains the following:
1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), ... : font width unknown for character 0x20
The resulting pdf-file looks as follows (the code is shortened to make it faster to read) compiled pdf of the code above
Thanks for potential help!