= R Sysfonts = The '''`sysfonts`''' package imports fonts from the system registry into R's registry. <> ---- == Installation == [[R/InstallingPackages|Install]] the `sysfonts` package. ---- == Usage == If a font must be downloaded from the internet, try: {{{ download.file(uri, basename(uri)) untar(basename(uri), compressed = "gzip") }}} With the font file available locally, try: {{{ sysfonts::font_add("myfont", r"(path/to/myfontdir/myfont.otf)") }}} Alternatively, add the font file to the search path so that it can be used without a path. {{{ library(sysfonts) font_paths("path/to/myfontdir") font_add("myfont", regular = "myfont.otf") }}} In any case, it is likely necessary to now use [[R/Showtext|showtext]] to rasterize the fonts added. ---- == See also == [[https://CRAN.R-project.org/package=sysfonts|sysfonts CRAN page]] ---- CategoryRicottone