load_fonts | R Documentation |
This function is used to load the font files needed for the theme. It is
called automatically when the package loads. By default it looks for the
required files in a standard location: a folder in the user's home directory
called .clcharts
.
load_fonts(
national_semibold = getOption("clcharts.national_semibold"),
national_book = getOption("clcharts.national_book"),
open_sans_regular = getOption("clcharts.open_sans_regular"),
open_sans_bold = getOption("clcharts.open_sans_bold")
)
national_semibold |
Path to the font file for National-Semibold |
national_book |
Path to the font file for National-Book |
open_sans_regular |
Path to the font file for OpenSans-Regular |
open_sans_bold |
Path to the font file for OpenSans-Regular |
This function is needed because there are too many inconsistencies in the way R handles fonts on different operating systems. Rather than trying to find and load the correct system fonts in all circustances, a font bundle is available to package users which contains the licensed fonts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.