Kaynağa Gözat

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 7 yıl önce
ebeveyn
işleme
9a9d4b79c4
9 değiştirilmiş dosya ile 14 ekleme ve 10 silme
  1. +7
    -3
      R/ggplot2.R
  2. BIN
      docs/reference/theme_xaringan-1.png
  3. +2
    -2
      docs/reference/theme_xaringan.html
  4. BIN
      docs/reference/theme_xaringan_base-1.png
  5. +1
    -1
      docs/reference/theme_xaringan_base.html
  6. BIN
      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 Dosyayı Görüntüle

@@ -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
docs/reference/theme_xaringan-1.png Dosyayı Görüntüle

Önce Sonra
Genişlik: 1400  |  Yükseklik: 866  |  Boyut: 58KB

+ 2
- 2
docs/reference/theme_xaringan.html
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


BIN
docs/reference/theme_xaringan_base-1.png Dosyayı Görüntüle

Önce Sonra
Genişlik: 1400  |  Yükseklik: 866  |  Boyut: 82KB

+ 1
- 1
docs/reference/theme_xaringan_base.html
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


BIN
docs/reference/theme_xaringan_inverse-1.png Dosyayı Görüntüle

Önce Sonra
Genişlik: 1400  |  Yükseklik: 866  |  Boyut: 58KB

+ 2
- 2
docs/reference/theme_xaringan_inverse.html
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 1
- 1
man/theme_xaringan.Rd Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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) +

Yükleniyor…
İptal
Kaydet