font_paths: Get/Set Font Search Paths

View source: R/font.R

font_pathsR Documentation

Get/Set Font Search Paths

Description

The two versions of this function are equivalent, but the "underscore" naming is preferred.

This function gets/sets the search paths for font files. See font_add() for details about how sysfonts looks for font files. There is also a complete example showing the usage of these functions in the help page of font_add().

Usage

font_paths(new)

font.paths(new)

Arguments

new

a character vector indicating the search paths to be prepended. If the argument is missing, the function will return the current search paths.

Details

Default search paths will be assigned when package is loaded:

  • For Windows, it is %windir%\Fonts, usually expanded into C:\Windows\Fonts

  • For Mac OS, default paths are /Library/Fonts and ~/Library/Fonts and their subdirectories

  • For Linux and other Unix-like OS, /usr/share/fonts, /usr/local/share/fonts, ~/.fonts, ~/.local/share/fonts, and their subdirectories

Value

The updated search paths.

Author(s)

Yixuan Qiu <https://statr.me/>


yixuan/sysfonts documentation built on March 6, 2024, 9:21 a.m.