R/zzz.R

Defines functions get_fallback .onLoad release_bullets

Documented in get_fallback

release_bullets <- function() {
  c(
    '`rhub::check_on_solaris(env_vars = c("_R_CHECK_FORCE_SUGGESTS_" = "false"))`',
    '`rhub::check_with_valgrind(env_vars = c(VALGRIND_OPTS = "--leak-check=full --track-origins=yes"))`'
  )
}

.onLoad <- function(...) {
  load_emoji_codes()
}

warn_env <- new.env(parent = emptyenv())
warn_env$warned <- FALSE

#' Get location of the fallback font
#' 
#' @export
#' @keywords internal
get_fallback <- function() {
  if (!warn_env$warned) {
    warning("No fonts detected on your system. Using an empty font.", call. = FALSE)
    warn_env$warned <- TRUE
  }
  list(
    system.file("unfont.ttf", package = "systemfonts"),
    0L
  )
}

Try the systemfonts package in your browser

Any scripts or data that you put into this service are public.

systemfonts documentation built on May 29, 2024, 9:20 a.m.