Installing Metropolis Fonts as a System Font
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.
macOS
- Locate the font files: In R, run
system.file("fonts/metropolis_5.1.0", package = "MSUthemes")
to find the directory - Open Finder and navigate to that directory
- Select all
.ttf
files - Double-click any font file and click “Install Font” in Font Book
- Restart R/RStudio/VS Code
Windows
- Locate the font files: In R, run
system.file("fonts/metropolis_5.1.0", package = "MSUthemes")
to find the directory - Open File Explorer and navigate to that directory
- Select all
.ttf
files - Right-click and select “Install” (or “Install for all users” if available)
- Restart R/RStudio/VS Code
Linux
Locate 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 -fv
Restart 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.