|
⇤ ← Revision 1 as of 2023-06-15 13:53:16
Size: 827
Comment:
|
Size: 931
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 42: | Line 42: |
| In any case, it is likely necessary to now use [[R/Showtext|showtext]] to rasterize the fonts added. |
R Sysfonts
The sysfonts package imports fonts from the system registry into R's registry.
Contents
Installation
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 showtext to rasterize the fonts added.
