Просмотр исходного кода

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 лет назад
Родитель
Сommit
9a9d4b79c4
9 измененных файлов: 14 добавлений и 10 удалений
  1. +7
    -3
      R/ggplot2.R
  2. Двоичные данные
      docs/reference/theme_xaringan-1.png
  3. +2
    -2
      docs/reference/theme_xaringan.html
  4. Двоичные данные
      docs/reference/theme_xaringan_base-1.png
  5. +1
    -1
      docs/reference/theme_xaringan_base.html
  6. Двоичные данные
      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 Просмотреть файл

@@ -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.",

Двоичные данные
docs/reference/theme_xaringan-1.png Просмотреть файл

Before After
Width: 1400  |  Height: 866  |  Size: 58KB

+ 2
- 2
docs/reference/theme_xaringan.html
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


Двоичные данные
docs/reference/theme_xaringan_base-1.png Просмотреть файл

Before After
Width: 1400  |  Height: 866  |  Size: 82KB

+ 1
- 1
docs/reference/theme_xaringan_base.html
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


Двоичные данные
docs/reference/theme_xaringan_inverse-1.png Просмотреть файл

Before After
Width: 1400  |  Height: 866  |  Size: 58KB

+ 2
- 2
docs/reference/theme_xaringan_inverse.html
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 1
- 1
man/theme_xaringan.Rd Просмотреть файл

@@ -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 Просмотреть файл

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

Загрузка…
Отмена
Сохранить