| base, | base, | ||||
| gsub(" ", "+", family), | gsub(" ", "+", family), | ||||
| if (!is.null(weights)) paste0(":", weights), | if (!is.null(weights)) paste0(":", weights), | ||||
| if (!is.null(languages)) paste0("&subset=", languages) | |||||
| if (!is.null(languages)) paste0("&subset=", languages), | |||||
| "&display=swap" | |||||
| ) | ) | ||||
| ), | ), | ||||
| class = "google_font" | class = "google_font" |
| {{#xaringanthemer_version}} * Version: {{xaringanthemer_version}}{{/xaringanthemer_version}} | {{#xaringanthemer_version}} * Version: {{xaringanthemer_version}}{{/xaringanthemer_version}} | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url({{text_font_url}}); | |||||
| @import url({{header_font_url}}); | |||||
| @import url({{code_font_url}}); | |||||
| {{#extra_font_imports}}{{extra_font_imports}}{{/extra_font_imports}} | |||||
| @import url({{{text_font_url}}}); | |||||
| @import url({{{header_font_url}}}); | |||||
| @import url({{{code_font_url}}}); | |||||
| {{#extra_font_imports}}{{{extra_font_imports}}}{{/extra_font_imports}} | |||||
| :root { | :root { | ||||
| /* Fonts */ | /* Fonts */ | ||||
| .remark-slide-content { | .remark-slide-content { | ||||
| background-color: var(--background-color); | background-color: var(--background-color); | ||||
| font-size: {{text_font_size}};{{#background_image}} | font-size: {{text_font_size}};{{#background_image}} | ||||
| background-image: url({{background_image}});{{#background_size}} | |||||
| background-image: url({{{background_image}}});{{#background_size}} | |||||
| background-size: {{background_size}};{{/background_size}}{{#background_position}} | background-size: {{background_size}};{{/background_size}}{{#background_position}} | ||||
| background-position: {{background_position}};{{/background_position}}{{/background_image}} | background-position: {{background_position}};{{/background_position}}{{/background_image}} | ||||
| padding: {{padding}}; | padding: {{padding}}; | ||||
| } | } | ||||
| .title-slide { | .title-slide { | ||||
| background-color: var(--title-slide-background-color);{{#title_slide_background_image}} | background-color: var(--title-slide-background-color);{{#title_slide_background_image}} | ||||
| background-image: url("{{title_slide_background_image}}");{{/title_slide_background_image}}{{#title_slide_background_size}} | |||||
| background-image: url("{{{title_slide_background_image}}}");{{/title_slide_background_image}}{{#title_slide_background_size}} | |||||
| background-size: {{title_slide_background_size}};{{/title_slide_background_size}}{{#title_slide_background_position}} | background-size: {{title_slide_background_size}};{{/title_slide_background_size}}{{#title_slide_background_position}} | ||||
| background-position: {{title_slide_background_position}};{{/title_slide_background_position}} | background-position: {{title_slide_background_position}};{{/title_slide_background_position}} | ||||
| } | } |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| * Version: a.b.c.d.eeee | * Version: a.b.c.d.eeee | ||||
| * | * | ||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700); | |||||
| @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Cabin:600, 600i&display=swap); | |||||
| @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400, 700&display=swap); | |||||
| :root { | :root { |
| Family: Josefin Sans | Family: Josefin Sans | ||||
| Weights: 400,400i,600i,700 | Weights: 400,400i,600i,700 | ||||
| URL: https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700 | |||||
| URL: https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700&display=swap |
| # test_that("list2fonts()", {}) | # test_that("list2fonts()", {}) | ||||
| describe("list2fonts()", { | describe("list2fonts()", { | ||||
| lato_url <- "https://fonts.googleapis.com/css?family=Lato" | |||||
| worksans_url <- "https://fonts.googleapis.com/css?family=Work+Sans" | |||||
| lato_url <- "https://fonts.googleapis.com/css?family=Lato&display=swap" | |||||
| worksans_url <- "https://fonts.googleapis.com/css?family=Work+Sans&display=swap" | |||||
| it("handles a list or c() of font urls", { | it("handles a list or c() of font urls", { | ||||
| expect_equal( | expect_equal( |