Re-runs the font discovery process using the current value of
getOption("ksTFL.font_dirs"). This is useful after installing
new fonts or after changing the ksTFL.font_dirs option.
Details
To point ksTFL at a custom TTF folder, set the ksTFL.font_dirs
option before or during your session, then call tfl_rescan_fonts():
options(ksTFL.font_dirs = "/path/to/your/fonts")
tfl_rescan_fonts()Multiple directories are supported:
options(ksTFL.font_dirs = c("/path/to/fonts1", "/path/to/fonts2"))
tfl_rescan_fonts()The package's own bundled fonts directory is always scanned automatically;
ksTFL.font_dirs only adds extra directories on top of that.
To make the setting persistent across sessions, add the options()
call to your ~/.Rprofile.
See also
tfl_font_status() to print the cached report without rescanning.