cardargus0.2.1 package

Generate SVG Information Cards with Embedded Fonts and Badges

batch_svg_to_png

Batch convert multiple SVG cards to PNG

card_to_grob

Create a grob for grid/ggplot2

cardargus-package

cardargus: Generate SVG Information Cards with Embedded Fonts and Badg...

chrome_available

Check if Chrome/Chromium is available for rendering

chrome_cache_dir

Get Chrome cache directory

compress_number

Compress number to abbreviated format

create_badge_row

Create a row of SVG badges with uniform height

create_badge

Create an SVG Badge

create_bottom_logo_row

Create logo row for bottom-left corner of card

create_logo_row

Create logo row for top-right corner of card

css_gradient_to_svg

Convert CSS gradient to SVG gradient

custom_logo_svg

Generic logo placeholder SVG

detect_svg_fonts

Detect font families used in an SVG

download_google_font_woff2

Download a Google Font as WOFF2 to the cache

embed_svg_fonts

Embed a font file into an SVG via @font-face

ensure_cardargus_fonts

Ensure cardargus fonts are available (WOFF2 cache)

ensure_chrome

Ensure Chrome is available, downloading if necessary

ensure_output_dir

Ensure output directory exists

escape_xml

Escape XML special characters

find_chrome_in_dir

Find Chrome executable in a directory

find_chrome_path

Find Chrome executable path

font_available

Check if a font is available for embedding

font_cache_dir

Get font cache directory

font_cache_path

Build a cache filename for a font family

generate_id

Generate unique ID suffix

get_chrome_download_info

Get Chrome for Testing download info

get_chrome_platform

Get platform identifier for Chrome downloads

get_font_css

Get Google Font CSS for embedding in SVG

get_svg_path

Get path to a bundled SVG file

icon_building

Building Icon SVG

icon_construction

Construction Icon SVG

icon_house

House Icon SVG

icon_map_pin

Map Pin Icon SVG

icon_money

Dollar/Money Icon SVG

include_card_png

Display card as PNG in knitr/Quarto document

include_card

Display card in knitr/Quarto document (SVG via data URI)

install_fonts

Pre-download fonts for offline use

is_light_color

Check if a color is light

list_bundled_svgs

List available bundled SVG files

list_fonts

List registered/cached fonts

load_svg_for_embed

Load and process external SVG file for embedding

parse_svg_root_dim

Parse a numeric width/height from the root <svg ...> tag

prepare_svg_for_raster

Prepare SVG for rasterization (sanitize + embed fonts)

register_cardargus_knitr

Register cardargus knitr engine

register_font

Register a local font file for embedding

register_google_font

Register Google Font (sysfonts)

sanitize_svg_for_raster

Sanitize SVG for rasterization engines (librsvg / ImageMagick)

sanitize_svg_metadata

Sanitize SVG metadata for Chrome rendering

save_card_for_knitr

Save card and return path for knitr

save_svg

Save SVG string to file (sanitized + embedded fonts)

setup_fonts

Setup showtext for cardargus

svg_card

Create an Information Card in SVG Format

svg_to_formats

Convert SVG to multiple formats

svg_to_pdf_chrome

Convert SVG to PDF using headless Chrome

svg_to_png_chrome

Convert SVG to PNG using headless Chrome

svg_to_png_with_margin

Convert SVG to PNG with optional margin and background

svg_to_png

Convert SVG to PNG

svgs_dir

Get the path to package SVGs directory

text_height

Calculate text height using gdtools

text_width

Calculate text width using gdtools

wrap_text

Wrap text to fit within a given width

write_svg_html_temp

Create a temporary HTML file wrapping an SVG

write_svg_tempfile

Write SVG content to a temporary .svg file

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 format and display them in 'R Markdown' and 'Quarto' documents.

  • Maintainer: Andre Leite
  • License: MIT + file LICENSE
  • Last published: 2026-02-05