Learn R Programming

gdtools (version 0.4.0)

fonts_cache_dir: manage font working directory

Description

Initialize or remove font directory used to store downloaded font files.

This directory is managed by R function R_user_dir() but can also be defined in a non-user location by setting ENV variable GDTOOLS_CACHE_DIR or by setting R option GDTOOLS_CACHE_DIR.

Its value can be read with the fonts_cache_dir() function.

The directory can be deleted with rm_fonts_cache() and created with init_fonts_cache().

Usage

fonts_cache_dir()

rm_fonts_cache()

init_fonts_cache()

Arguments

See Also

Other functions for font management: addGFontHtmlDependency(), gfontHtmlDependency(), install_gfont_script(), installed_gfonts(), liberationsansHtmlDependency(), register_gfont(), register_liberationsans()

Examples

Run this code
fonts_cache_dir()

options(GDTOOLS_CACHE_DIR = tempdir())
fonts_cache_dir()
options(GDTOOLS_CACHE_DIR = NULL)

Sys.setenv(GDTOOLS_CACHE_DIR = tempdir())
fonts_cache_dir()
Sys.setenv(GDTOOLS_CACHE_DIR = "")



init_fonts_cache()
dir.exists(fonts_cache_dir())

rm_fonts_cache()
dir.exists(fonts_cache_dir())

Run the code above in your browser using DataLab