reset_font_cache: Reset the system font cache

View source: R/system_fonts.R

reset_font_cacheR Documentation

Reset the system font cache


Building the list of system fonts is time consuming and is therefore cached. This, in turn, means that changes to the system fonts (i.e. installing new fonts), will not propagate to systemfonts. The solution is to reset the cache, which will result in the next call to e.g. match_font() will trigger a rebuild of the cache.




all_fonts <- system_fonts()

##-- Install a new font on the system --##

all_fonts_new <- system_fonts()

## all_fonts_new will be equal to all_fonts


all_fonts_new <- system_fonts()

## all_fonts_new will now contain the new font

systemfonts documentation built on March 18, 2022, 7:49 p.m.