Skip to content

Commit

Permalink
SVG: work around firefox font size bug
Browse files Browse the repository at this point in the history
Closes #42
  • Loading branch information
gaborcsardi committed Aug 5, 2022
1 parent 0f3ed00 commit 424359f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/svg.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ write_svg <- function(cast, path, window = NULL, start_at = NULL, end_at = NULL,
theme = theme))

svg <- ct$call("svgterm.render", json, options)
svg <- gsub(
"<text",
paste0("<text font-size=\"", theme$fontSize, "\""),
svg,
fixed = TRUE
)
cat(svg, file = path)

invisible()
Expand Down

0 comments on commit 424359f

Please sign in to comment.