Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ragg PNG device with native SVG device for vignettes #188

Merged
merged 5 commits into from
Mar 3, 2025

Conversation

nanxstats
Copy link
Collaborator

@nanxstats nanxstats commented Mar 1, 2025

This PR replaces the current graphical device for plots in vignettes (ragg PNG) with the R native SVG device.

This has a few benefits:

  1. Makes plots look much sharper by using vector graphics.
  2. Reduces the package tarball size from 1.5Mb to ~990KB.
  3. Removes the soft dependency on ragg. ragg's hard dependency systemfonts is having trouble being built on r-oldrel-macos-arm64 on CRAN, which results in the following build error for gsDesign on that platform, for every vignette that used the ragg PNG device:
Error(s) in re-building vignettes:
--- re-building ‘ConditionalErrorSpending.Rmd’ using rmarkdown
  
Quitting from lines 54-58 [unnamed-chunk-2] (ConditionalErrorSpending.Rmd)
Error: processing vignette 'ConditionalErrorSpending.Rmd' failed with diagnostics:
there is no package called 'systemfonts'
--- failed re-building ‘ConditionalErrorSpending.Rmd’

...

@nanxstats nanxstats merged commit daea8db into master Mar 3, 2025
8 checks passed
@nanxstats nanxstats deleted the no-ragg branch March 3, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant