Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions R/font.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
#'
#' @param paths A vector of directories to search in. (Default is to auto-detect based on OS)
#' @param recursive Search recursively in directories? (Default TRUE)
#' @param prompt Show confirmation prompt? (Default TRUE)
#' @param prompt Show confirmation prompt? (Default TRUE for interactive sessions)
#' @param pattern A regular expression that the filenames must match.
#'
#' @examples
#' font_import()
#'
#' @export
font_import <- function(paths = NULL, recursive = TRUE, prompt = TRUE,
font_import <- function(paths = NULL, recursive = TRUE, prompt = NULL,
pattern = NULL) {

if (is.null(prompt)) {
prompt <- interactive()
}

if (prompt) {
resp <- readline("Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.\nContinue? [y/n] ")
if (tolower(resp) != "y") {
Expand Down
5 changes: 2 additions & 3 deletions man/font_import.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.