ソースを参照

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
コミット
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 ファイルの表示

#' @examples #' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) { #' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' # Set xaringanthemer theme but save to tempfile #' # Set xaringanthemer theme but save to tempfile
#' duo_accent(outfile = tempfile())
#' style_duo_accent(outfile = tempfile())
#' #'
#' library(ggplot2) #' library(ggplot2)
#' ggplot(iris) + #' ggplot(iris) +
#' @examples #' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) { #' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' # Set xaringanthemer theme but save to tempfile #' # Set xaringanthemer theme but save to tempfile
#' duo_accent(outfile = tempfile())
#' style_duo_accent(outfile = tempfile())
#' #'
#' library(ggplot2) #' library(ggplot2)
#' ggplot(iris) + #' ggplot(iris) +
"Roboto", "Source Code Pro", "Yanone Kaffeesatz" "Roboto", "Source Code Pro", "Yanone Kaffeesatz"
) )
if (identical(google, TRUE) || is_default_font) { 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 { } else {
warning(paste( warning(paste(
"Please manually register fonts not served by Google Fonts.", "Please manually register fonts not served by Google Fonts.",

バイナリ
docs/reference/theme_xaringan-1.png ファイルの表示

変更前 変更後
幅: 1400  |  高さ: 866  |  サイズ: 58KB

+ 2
- 2
docs/reference/theme_xaringan.html
ファイル差分が大きすぎるため省略します
ファイルの表示


バイナリ
docs/reference/theme_xaringan_base-1.png ファイルの表示

変更前 変更後
幅: 1400  |  高さ: 866  |  サイズ: 82KB

+ 1
- 1
docs/reference/theme_xaringan_base.html
ファイル差分が大きすぎるため省略します
ファイルの表示


バイナリ
docs/reference/theme_xaringan_inverse-1.png ファイルの表示

変更前 変更後
幅: 1400  |  高さ: 866  |  サイズ: 58KB

+ 2
- 2
docs/reference/theme_xaringan_inverse.html
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 1
- 1
man/theme_xaringan.Rd ファイルの表示

\examples{ \examples{
if (requireNamespace("ggplot2", quietly = TRUE)) { if (requireNamespace("ggplot2", quietly = TRUE)) {
# Set xaringanthemer theme but save to tempfile # Set xaringanthemer theme but save to tempfile
duo_accent(outfile = tempfile())
style_duo_accent(outfile = tempfile())


library(ggplot2) library(ggplot2)
ggplot(iris) + ggplot(iris) +

+ 1
- 1
man/theme_xaringan_inverse.Rd ファイルの表示

\examples{ \examples{
if (requireNamespace("ggplot2", quietly = TRUE)) { if (requireNamespace("ggplot2", quietly = TRUE)) {
# Set xaringanthemer theme but save to tempfile # Set xaringanthemer theme but save to tempfile
duo_accent(outfile = tempfile())
style_duo_accent(outfile = tempfile())


library(ggplot2) library(ggplot2)
ggplot(iris) + ggplot(iris) +

読み込み中…
キャンセル
保存