Generate SVG Information Cards with Embedded Fonts and Badges
Overview
Create self-contained SVG information cards with embedded 'Google Fonts', shields-style badges, and custom logos. Cards are fully portable SVG files ideal for dashboards, reports, and web applications. Includes functions to export cards to PNG and PDF formats and display them in 'R Markdown' and 'Quarto' documents.
New features
svg_to_pdf()exports a card to a **vector** PDF viarsvg::rsvg_pdf(), mirroringsvg_to_png()(sanitizes the SVG and embeds WOFF2 fonts). For Chrome-based rendering,svg_to_pdf_chrome()remains available (#17).save_card_for_knitr()now acceptsformat = "pdf"(in addition to"svg"and"png"), using Chrome when available andsvg_to_pdf()otherwise.
Chrome rendering: more robust, faster, higher quality
The Chrome-based conversion pipeline (svg_to_png_chrome(),
svg_to_pdf_chrome(), batch_svg_to_*_chrome()) was reworked:
- **Deterministic readiness wait.** Conversions no longer rely on a fixed
Sys.sleep(): the page load event anddocument.fonts.readyare awaited, so screenshots/PDFs are never captured before web fonts finish rendering, and no time is wasted over-waiting. Theload_waitargument now means an *extra* wait after readiness and defaults to 0; a newtimeoutargument (default 10s) bounds the readiness wait.
Show all changes in 0.2.5Hide the rest of the changes in 0.2.5
- **Persistent Chrome session.** A single health-checked session is reused across calls (and replaced transparently if it dies), removing the ~1-2s session startup previously paid on every conversion. The session is closed when the package is unloaded.
- **No temp files.** Pages are loaded via
data:URLs instead of temporary HTML files andfile://navigation (a temp file is used only for very large documents), avoiding path/permission issues on Windows. - **Real alpha transparency.** With
background = "transparent",svg_to_png_chrome()now produces a PNG with a true alpha channel (previously the backdrop was flattened).
Minor improvements
svg_to_formats(formats = "pdf")now reusessvg_to_pdf()for the vector path and warns explicitly when it falls back to a rasterized PDF viamagick.
Bug fixes
magickandrsvgmoved fromImportstoSuggests: they are only needed for raster/PDF export, which is already guarded byrequireNamespace(). This lightens the install footprint and matches the package's "heavy deps in Suggests" convention (#19).svg_card()now sizes badges usingvalue_fontsizeinstead of a hard-coded10, preventing clipped/misaligned badge text whenvalue_fontsizediffers from 10 (#18).is_light_color()now reports an unknown color name with a clearclierror instead of lettingcol2rgb()raise a raw base error (#20)..onLoad()no longer tries to download the Jost font from Google Fonts when it is not installed on the system. Network access at load time is against CRAN policy and produced a non-suppressible startup message on machines without the font (the cause of the spurious WARNINGs on the CRAN r-oldrel-macos-arm64 checks for 0.2.4). Fonts are registered on demand when a card is rendered, as before.- The GitHub stars badge in the README now links to the repository root: the
/stargazerspage answers 404 to the HEAD requests CRAN's URL checker uses.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-28
- WARNING12 OK, 2 WARNING2026-03-10
Documentation
- Help pages
- 84 (42 internal)includes a package overview page
- Examples that run
- 88%21 run in a plain check (2 of them under a condition) · 1 only when donttest examples are enabled (R CMD check --as-cran) · 2 never run
- Exported functions with examples
- 57%
- Documented parameters
- 99%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- Introduction to cardargus HTML
- Customizing Cards HTML
- Export and Conversion HTML
- Font Management HTML
- Icons and Logos HTML
- Working with Badges HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 15
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Issues over time
Commits over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/strategicprojects/cardargus on 2026-10-22.
GitHub Pages site last deployed 2026-09-29 · The repository has a site deploy workflow
pkgdown site last built 2026-09-29
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-06-13Named in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: .claude, CLAUDE.mdCommits: at least 23 crediting it in the message
- Claude CodePull requests: 8 from outside contributors, first on 2026-06-14
- Claude Opus 4.816 commits · Jun 2026
- Claude Fable 54 commits · Jul 2026
- Claude Opus 5.53 commits · Sep 2026
Dependencies
Installing cardargus adds 17 packages (12 with compiled code, 13 MB of source tarballs). Heaviest: fontLiberation 4.3 MB, fontquiver 2.1 MB, Rcpp 1.8 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.5Latest
- 0.2.42026-06-14 · diff ↗
- 0.2.32026-06-14 · diff ↗
- RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2026-03-01
- 0.2.2
- archivedRemoved from CRAN2026-02-12repeated policy violation Even on re-submission after notification
- 0.2.12026-02-05 · diff ↗ ·
removed 11 exports
badge_row_svg, badge_svg, building_icon_svg, cardargus_font_cache_dir, construction_icon_svg, house_icon_svg, install_cardargus_fonts, map_pin_icon_svg, money_icon_svg, register_knitr_engine, setup_cardargus_fonts - 0.2.02026-01-31
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-01-31
- Total releases
- 6 / 1 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 1.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("cardargus")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.