feat: svg_to_pdf() + audit fixes (v0.2.5) - #21
Merged
Conversation
Export cards to vector PDF and resolve open audit items. - svg_to_pdf(): vector PDF via rsvg::rsvg_pdf(), mirroring svg_to_png() (sanitizes + embeds WOFF2 fonts). save_card_for_knitr() gains format="pdf"; svg_to_formats() reuses svg_to_pdf() and warns on the rasterized magick fallback. (#17) - svg_card(): size badges with value_fontsize instead of a hard-coded 10, preventing clipped/misaligned badge text. (#18) - Move magick and rsvg from Imports to Suggests (only needed for raster/PDF, already guarded by requireNamespace); guard the affected examples. (#19) - is_light_color(): report unknown color names via cli instead of a raw col2rgb() error. (#20) - Tests for svg_to_pdf() and the is_light_color() name path; DESCRIPTION/NEWS bumped to 0.2.5. R CMD check --as-cran: 0/0/0. Closes #17 #18 #19 #20 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Adiciona exportação de cards para PDF vetorial e resolve os itens em aberto da auditoria.
R CMD check --as-cran: 0 errors | 0 warnings | 0 notes; 85 testes passando.Mudanças
svg_to_pdf()(novo,#17): PDF vetorial viarsvg::rsvg_pdf(), simétrico asvg_to_png()(sanitiza + embute fontes WOFF2).save_card_for_knitr()aceitaformat = "pdf";svg_to_formats()reusasvg_to_pdf()e avisa quando cai no fallback rasterizado viamagick.svg_card()(#18): badges dimensionados comvalue_fontsizeem vez de10fixo — evita corte/desalinhamento do texto.magick/rsvg→Suggests(#19): só usados em raster/PDF (já protegidos porrequireNamespace); exemplos afetados foram guardados.is_light_color()(#20): nome de cor inválido agora reporta erro viacliem vez do erro cru decol2rgb().Testes / docs
svg_to_pdf()(header%PDF, tempfile) e para o caminho de nome inválido deis_light_color().DESCRIPTIONeNEWS.mdbumpados para 0.2.5;man/regenerado (devtools::document()).Closes #17 #18 #19 #20
🤖 Generated with Claude Code