Skip to content

Commit 82a0b13

Browse files
committed
accept proposed changes from review
1 parent b410f97 commit 82a0b13

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

R/drawing-context.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ set_context_gp <- function(drawing_context, gp = NULL) {
7070

7171
# update the fontface of a drawing context
7272
set_context_fontface <- function(drawing_context, fontface = "plain", overwrite = FALSE) {
73-
fontface_old <- drawing_context$gp$font
73+
font_old <- drawing_context$gp$font
7474

7575
# combine bold and italic if needed
7676
if (!isTRUE(overwrite)) {
77-
if (isTRUE(fontface == "italic") && isTRUE(fontface_old == 2)) { # see ?grid::gpar for fontface codes
77+
if (isTRUE(fontface == "italic") && isTRUE(font_old == 2)) { # see ?grid::gpar for fontface codes
7878
fontface <- "bold.italic"
79-
} else if (isTRUE(fontface == "bold") && isTRUE(fontface_old == 3)) {
79+
} else if (isTRUE(fontface == "bold") && isTRUE(font_old == 3)) {
8080
fontface <- "bold.italic"
8181
}
8282
}

R/text-details.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
#'
33
#' Calculate text details for a given text label
44
#' @param label Character vector containing the label. Can handle only one label at a time.
5-
#' @param gp Grid graphical parameters defining the font (`fontfamily`, `font`, and
5+
#' @param gp Grid graphical parameters defining the font (`fontfamily`, `fontface`, and
66
#' `fontsize` should be defined).
77
#' @examples
8-
#' text_details("Hello world!", grid::gpar(fontfamily = "", font = "plain", fontsize = 12))
9-
#' text_details("Hello world!", grid::gpar(fontfamily = "", font = "plain", fontsize = 24))
8+
#' text_details("Hello world!", grid::gpar(fontfamily = "", fontface = "plain", fontsize = 12))
9+
#' text_details("Hello world!", grid::gpar(fontfamily = "", fontface = "plain", fontsize = 24))
1010
#' text_details(
1111
#' "Hello world\nwith newline",
12-
#' grid::gpar(fontfamily = "", font = "plain", fontsize = 12)
12+
#' grid::gpar(fontfamily = "", fontface = "plain", fontsize = 12)
1313
#' )
1414
#' @noRd
1515
text_details <- function(label, gp = gpar()) {

0 commit comments

Comments
 (0)