For optimal performance and to avoid plot dimension changes, we recommend installing Metropolis as a system font.
Either download the Metropolis font from https://fontsource.org/fonts/metropolis and install it using the standard OS tool. Alternatively, the font files are included in the MSUthemes package at inst/fonts/metropolis_5.1.0/. The following instructions should enable you to install Metropolis as a system font.
system.file("fonts/metropolis_5.1.0", package = "MSUthemes") to find the directory.ttf filessystem.file("fonts/metropolis_5.1.0", package = "MSUthemes") to find the directory.ttf filesLocate the font files: In R, run system.file("fonts/metropolis_5.1.0", package = "MSUthemes") to find the directory
Copy the .ttf files to ~/.fonts/ (create the directory if it doesn’t exist):
mkdir -p ~/.fonts
cp /path/to/MSUthemes/fonts/metropolis_5.1.0/*.ttf ~/.fonts/
fc-cache -fvRestart R/RStudio/VS Code
If you don’t install Metropolis as a system font, the package will automatically use it via the showtext package, but this may cause slight changes to plot dimensions.