ragg will take priority over Cairo

This commit is contained in:
Carson
2020-04-14 09:26:23 -05:00
parent 393d4163c8
commit 16196eeaaa
2 changed files with 6 additions and 6 deletions

View File

@@ -98,8 +98,7 @@ Suggests:
future,
dygraphs,
thematic,
ragg,
showtext
ragg
Remotes:
rstudio/htmltools,
rstudio/shinytest,

View File

@@ -6,13 +6,14 @@ startPNG <- function(filename, width, height, res, ...) {
# Finally, if neither quartz nor Cairo, use png().
if (capabilities("aqua")) {
pngfun <- grDevices::png
} else if ((getOption('shiny.usecairo') %OR% TRUE) &&
nchar(system.file(package = "Cairo"))) {
pngfun <- Cairo::CairoPNG
} else if (nchar(system.file(package = "ragg"))) {
} else if ((getOption('shiny.useragg') %OR% TRUE) &&
nchar(system.file(package = "ragg"))) {
pngfun <- ragg::agg_png
args$background <- args$background %OR% args$bg
args$bg <- NULL
} else if ((getOption('shiny.usecairo') %OR% TRUE) &&
nchar(system.file(package = "Cairo"))) {
pngfun <- Cairo::CairoPNG
} else {
pngfun <- grDevices::png
}