😎 Give your xaringan slides some style
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

28 行
1.2KB

  1. #' @describeIn style_xaringan Default values for font family, wieght, URLs and
  2. #' font fallbacks.
  3. #' @param font_arg A font argument from the \pkg{xaringanthemer} `style_`
  4. #' function family.
  5. #' @export
  6. xaringanthemer_font_default <- function(font_arg) {
  7. x <- switch(
  8. font_arg,
  9. text_font_family = "Noto Sans",
  10. text_font_weight = "normal",
  11. text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
  12. text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
  13. header_font_family = "Cabin",
  14. header_font_weight = "600",
  15. header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
  16. code_font_family = "Source Code Pro",
  17. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
  18. code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
  19. stop("unknown font_arg: ", font_arg)
  20. )
  21. class(x) <- c("xaringanthemer_default", class(x))
  22. x
  23. }
  24. print.xaringanthemer_default <- function(x) {
  25. print(unclass(x))
  26. }