I am on Mac and need to use Calibri font for all ggplots, but i cannot make it work with either extrafont
or showtext
packages:
font_import(prompt = FALSE, pattern = "calibri")
returns
Scanning ttf files in /Library/Fonts/, /System/Library/Fonts, /System/Library/Fonts/Supplemental, ~/Library/Fonts/ ...
Extracting .afm files from .ttf files...
Error in data.frame(fontfile = ttfiles, FontName = "", stringsAsFactors = FALSE) :
arguments imply differing number of rows: 0, 1
and with showtext
list_of_fonts <- as.data.frame(font_files())
grep(pattern = "Calibri", x = list_of_fonts$family, ignore.case = TRUE, value = TRUE)
i get
character(0)
I use Calibri in Word with no issue, but how to get it to use with ggplot?
theme_set(theme_minimal(
base_family="Calibri"
))
In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "Calibri"