Procházet zdrojové kódy

Update theme_xaringan*() examples and safer sysfonts font adder

Seems Droid Serif is no longer "in" Google Fonts

Need to remove all the warnings from docs
tags/v0.3.0
Garrick Aden-Buie před 7 roky
rodič
revize
9a9d4b79c4
9 změnil soubory, kde provedl 14 přidání a 10 odebrání
  1. +7
    -3
      R/ggplot2.R
  2. binární
      docs/reference/theme_xaringan-1.png
  3. +2
    -2
      docs/reference/theme_xaringan.html
  4. binární
      docs/reference/theme_xaringan_base-1.png
  5. +1
    -1
      docs/reference/theme_xaringan_base.html
  6. binární
      docs/reference/theme_xaringan_inverse-1.png
  7. +2
    -2
      docs/reference/theme_xaringan_inverse.html
  8. +1
    -1
      man/theme_xaringan.Rd
  9. +1
    -1
      man/theme_xaringan_inverse.Rd

+ 7
- 3
R/ggplot2.R Zobrazit soubor

@@ -17,7 +17,7 @@
#' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' # Set xaringanthemer theme but save to tempfile
#' duo_accent(outfile = tempfile())
#' style_duo_accent(outfile = tempfile())
#'
#' library(ggplot2)
#' ggplot(iris) +
@@ -67,7 +67,7 @@ theme_xaringan <- function(
#' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' # Set xaringanthemer theme but save to tempfile
#' duo_accent(outfile = tempfile())
#' style_duo_accent(outfile = tempfile())
#'
#' library(ggplot2)
#' ggplot(iris) +
@@ -395,7 +395,11 @@ register_font <- function(
"Roboto", "Source Code Pro", "Yanone Kaffeesatz"
)
if (identical(google, TRUE) || is_default_font) {
sysfonts::font_add_google(family, ...)
tryCatch(
sysfonts::font_add_google(family, ...),
error = function(e) warning(e$message),
warning = function(w) warning(w$message)
)
} else {
warning(paste(
"Please manually register fonts not served by Google Fonts.",

binární
docs/reference/theme_xaringan-1.png Zobrazit soubor

Před Za
Šířka: 1400  |  Výška: 866  |  Velikost: 58KB

+ 2
- 2
docs/reference/theme_xaringan.html
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


binární
docs/reference/theme_xaringan_base-1.png Zobrazit soubor

Před Za
Šířka: 1400  |  Výška: 866  |  Velikost: 82KB

+ 1
- 1
docs/reference/theme_xaringan_base.html
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


binární
docs/reference/theme_xaringan_inverse-1.png Zobrazit soubor

Před Za
Šířka: 1400  |  Výška: 866  |  Velikost: 58KB

+ 2
- 2
docs/reference/theme_xaringan_inverse.html
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
man/theme_xaringan.Rd Zobrazit soubor

@@ -58,7 +58,7 @@ styles.
\examples{
if (requireNamespace("ggplot2", quietly = TRUE)) {
# Set xaringanthemer theme but save to tempfile
duo_accent(outfile = tempfile())
style_duo_accent(outfile = tempfile())

library(ggplot2)
ggplot(iris) +

+ 1
- 1
man/theme_xaringan_inverse.Rd Zobrazit soubor

@@ -57,7 +57,7 @@ A \link{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse"
\examples{
if (requireNamespace("ggplot2", quietly = TRUE)) {
# Set xaringanthemer theme but save to tempfile
duo_accent(outfile = tempfile())
style_duo_accent(outfile = tempfile())

library(ggplot2)
ggplot(iris) +

Načítá se…
Zrušit
Uložit