Skip to content

Commit

Permalink
v0.4.0 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Jun 24, 2021
1 parent b271eac commit 3a1d9f3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: xaringanthemer
Title: Custom 'xaringan' CSS Themes
Version: 0.3.4.9000
Version: 0.4.0
Authors@R:
person(given = "Garrick",
family = "Aden-Buie",
Expand Down
16 changes: 8 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# xaringanthemer (development version)
# xaringanthemer 0.4.0

* Added `text_bold_font_weight` argument to xaringanthemer style functions with
a corresponding CSS rule setting the `font-weight` property of `<strong>`
elements (thanks @matiasandina, #50).

* The style functions gain a `link_decoration` argument to set the
[`text-decoration`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration)
property for links (#57).

* Set slide number font size in `rem` so that increasing the font size at the
slide level doesn't result in giant slide numbers (#53).

* The xaringanthemer slide skeleton (R Markdown template) will now render when
packages that are used in the template but not in xaringanthemer's Imports are
not installed (#52).

* Set slide number font size in `rem` so that increasing the font size at the
slide level doesn't result in giant slide numbers (#53).

* xaringanthemer no longer sets the `fig.showtext` chunk option when the
showtext package isn't installed and also when `fig.showtext = FALSE`
(thanks @mikedecr #36, #56).

* The style functions gain a `link_decoration` argument to set the
[`text-decoration`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration)
property for links (#57).

# xaringanthemes 0.3.4

Expand Down
9 changes: 1 addition & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
## R CMD check results

0 errors | 0 warnings | 0 notes

No reverse dependencies.

Replaces previous submission with corrected links
for three URLs that were moved to a new location.
This is a new submission. This update is maintenance release.
3 changes: 3 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ home:
Give your xaringan slides some style with xaringanthemer.
Easy slide and plot themes for xaringan slides.
development:
mode: auto

template:
opengraph:
twitter:
Expand Down
10 changes: 9 additions & 1 deletion tests/testthat/test-ggplot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -499,18 +499,26 @@ describe("scale_xaringan_*", {

})

test_that("register_font() returns the name of the font family if font pkgs are missing", {
test_that("register_font() returns the name of the font family if {showtext} is missing", {
text_font_family <- xaringanthemer_font_default("text_font_family")

family_showtext_missing <- testthat::with_mock(
`xaringanthemer:::requires_package` = function(pkg, ...) pkg != "showtext",
register_font(text_font_family, google = TRUE)
)

expect_equal(family_showtext_missing, text_font_family)
})

test_that("register_font() returns the name of the font family if {sysfonts} is missing", {
skip_if_not_installed("showtext")

text_font_family <- xaringanthemer_font_default("text_font_family")

family_sysfonts_missing <- testthat::with_mock(
`xaringanthemer:::requires_package` = function(pkg, ...) pkg != "sysfonts",
register_font(text_font_family, google = TRUE)
)

expect_equal(family_sysfonts_missing, text_font_family)
})

0 comments on commit 3a1d9f3

Please sign in to comment.