Skip to content

Commit d227345

Browse files
committed
revert back to 11pt default size
1 parent ad2f722 commit d227345

7 files changed

+9
-9
lines changed

R/baseXML.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ genBaseStyleSheet <- function(dxfs = NULL, tableStyles = NULL, extLst = NULL) {
136136
list(
137137
numFmts = NULL,
138138

139-
fonts = c('<font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font>'),
139+
fonts = c('<font><sz val="11"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font>'),
140140

141141
fills = c(
142142
'<fill><patternFill patternType="none"/></fill>',

R/class-workbook-wrappers.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ wb_set_row_heights <- function(wb, sheet = current_sheet(), rows, heights) {
578578
#' @param sheet A name or index of a worksheet
579579
#' @param cols Indices of cols to set width
580580
#' @param widths width to set cols to specified in Excel column width units or "auto" for automatic sizing. The widths argument is
581-
#' recycled to the length of cols. The default width is 10. Though there is no specific default width for Excel, it depends on
581+
#' recycled to the length of cols. The default width is 8.43. Though there is no specific default width for Excel, it depends on
582582
#' Excel version, operating system and DPI settings used. Setting it to specific value also is no guarantee that the output will be
583583
#' of the selected width.
584584
#' @param hidden Logical vector. If TRUE the column is hidden.
@@ -788,7 +788,7 @@ wb_remove_worksheet <- function(wb, sheet = current_sheet()) {
788788
#'
789789
#' wb$add_data("S1", iris)
790790
#' wb$add_data_table("S1", x = iris, startCol = 10) ## font colour does not affect tables
791-
wb_set_base_font <- function(wb, fontSize = 12, fontColour = wb_colour(theme = "1"), fontName = "Calibri") {
791+
wb_set_base_font <- function(wb, fontSize = 11, fontColour = wb_colour(theme = "1"), fontName = "Calibri") {
792792
assert_workbook(wb)
793793
wb$clone()$set_base_font(
794794
fontSize = fontSize,

R/class-workbook.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ wbWorkbook <- R6::R6Class(
18631863
name <- unlist(xml_attr(baseFont, "font", "name"))
18641864

18651865
if (length(sz[[1]]) == 0) {
1866-
sz <- list("val" = "8.43")
1866+
sz <- list("val" = "11")
18671867
} else {
18681868
sz <- as.list(sz)
18691869
}

R/converters.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ calc_col_width <- function(base_font, col_width) {
9494

9595
# Note: cannot reproduce the exact values with MS365 on Mac. Nevertheless, these values are closer
9696
# to the expected widths
97-
adjust_macos <- ifelse(Sys.info()[["sysname"]] == "Darwin", +2, 0)
97+
adjust_macos <- ifelse(Sys.info()[["sysname"]] == "Darwin", +1, 0)
9898
widths <- trunc((as.numeric(col_width) * mdw + 5 + adjust_macos) / mdw * 256) / 256
9999
widths <- round(widths, 3)
100100
widths

man/wbWorkbook.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/wb_modify_basefont.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/wb_set_col_widths.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)