😎 Give your xaringan slides some style
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

29 lines
1.2KB

  1. #' @describeIn style_xaringan Default values for font family, weight, 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. #' @export
  25. print.xaringanthemer_default <- function(x, ...) {
  26. print(unclass(x))
  27. }