gadenbuie / xaringanthemer

@@ -66,7 +66,7 @@
Loading
66 66
  title_font = NULL,
67 67
  title_font_use_google = NULL,
68 68
  title_font_size = NULL,
69 -
  use_showtext = TRUE
69 +
  use_showtext = NULL
70 70
) {
71 71
  requires_xaringanthemer_env(css_file = css_file, try_css = TRUE)
72 72
  requires_package(fn = "xaringan_theme")
@@ -155,7 +155,7 @@
Loading
155 155
  title_font = NULL,
156 156
  title_font_use_google = NULL,
157 157
  title_font_size = NULL,
158 -
  use_showtext = TRUE
158 +
  use_showtext = NULL
159 159
) {
160 160
  requires_xaringanthemer_env(css_file = css_file, try_css = TRUE)
161 161
  requires_package(fn = "xaringan_theme")
@@ -224,10 +224,11 @@
Loading
224 224
#'   Fonts](https://fonts.google.com)?
225 225
#' @param title_font_size Base text font size, inherits from `title_font_size`,
226 226
#'   or defaults to 14.
227 -
#' @param use_showtext If `TRUE` (default) the \pkg{showtext} package will be
227 +
#' @param use_showtext If `TRUE` the \pkg{showtext} package will be
228 228
#'   used to register Google fonts. Set to `FALSE` to disable this feature
229 229
#'   entirely, which may result in errors during plotting if the fonts used are
230 -
#'   not available locally.
230 +
#'   not available locally. The default is `TRUE` when the \pkg{showtext}
231 +
#'   package is installed.
231 232
#' @param ... Ignored
232 233
#'
233 234
#' @examples
@@ -291,7 +292,7 @@
Loading
291 292
  title_font = NULL,
292 293
  title_font_use_google = NULL,
293 294
  title_font_size = NULL,
294 -
  use_showtext = TRUE
295 +
  use_showtext = NULL
295 296
) {
296 297
  text_color <- full_length_hex(text_color)
297 298
  background_color <- full_length_hex(background_color)
@@ -304,6 +305,9 @@
Loading
304 305
  text_font_use_google  <- text_font_use_google  %||% is_google_font(text_font)
305 306
  title_font_use_google <- title_font_use_google %||% is_google_font(title_font)
306 307
308 +
  if (is.null(use_showtext)) {
309 +
    use_showtext <- requires_package("showtext", "theme_xaringan", required = FALSE)
310 +
  }
307 311
  text_font <- if (!is.null(text_font)) {
308 312
    register_font(text_font, identical(text_font_use_google, TRUE) && use_showtext)
309 313
  } else {
Files Coverage
R 94.70%
Project Totals (17 files) 94.70%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading