Skip to content

Commit c9895c6

Browse files
committed
[style] use wb_base_font() size
1 parent 29c4c76 commit c9895c6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

R/class-workbook.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -3133,8 +3133,10 @@ wbWorkbook <- R6::R6Class(
31333133

31343134
sel <- panose$family == font_name & panose$type == font_type
31353135
if (!any(sel)) {
3136-
warning("Could not find font in panose table. Ignoring panose entry.")
31373136
panose_hex <- NULL
3137+
} else if (exists("font_panose")) {
3138+
# the input provides a panose value
3139+
panose_hex <- font_panose
31383140
} else {
31393141
panose_hex <- panose[sel, "panose"]
31403142
}

R/write.R

+4-3
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,11 @@ write_data2 <- function(
469469

470470
wb$add_font(
471471
sheet = sheetno,
472-
dims = dim_sel,
472+
dims = dim_sel,
473473
color = wb_color(hex = "FF0000FF"),
474-
name = wb_get_base_font(wb)$name$val,
475-
u = "single"
474+
name = wb_get_base_font(wb)$name$val,
475+
size = wb_get_base_font(wb)$size$val,
476+
u = "single"
476477
)
477478
}
478479

0 commit comments

Comments
 (0)