Skip to content

Commit

Permalink
[fonts] fallback to Aptos Narrow width if font not found
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jul 15, 2024
1 parent a3c2f1d commit 643b4a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/converters.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ calc_col_width <- function(base_font, col_width) {
font <- base_font$name$val
size <- as.integer(base_font$size$val)

if(!any(font %in% font_width_tab$FontFamilyName))

Check warning on line 97 in R/converters.R

View workflow job for this annotation

GitHub Actions / lint

file=R/converters.R,line=97,col=5,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.
font <- "Aptos Narrow"

sel <- font_width_tab$FontFamilyName == font & font_width_tab$FontSize == size
# maximum digit width of selected font
mdw <- font_width_tab$Width[sel]
Expand Down

0 comments on commit 643b4a6

Please sign in to comment.