powered by
Saves an SVG string to disk. Before saving, the function:
sanitizes the SVG to remove problematic Inkscape/Sodipodi metadata that can break strict XML parsers, and
detects and embeds fonts (WOFF2 via @font-face) for deterministic rendering.
This function expects the font helpers to be available in the package: detect_svg_fonts(), ensure_cardargus_fonts(), and embed_svg_fonts().
detect_svg_fonts()
ensure_cardargus_fonts()
embed_svg_fonts()
save_svg(svg_content, output_path)
Path to the saved SVG file.
SVG string (or object coercible to character).
Output file path.
svg <- svg_card("FAR", list(), list()) save_svg(svg, tempfile(fileext = ".svg"))
Run the code above in your browser using DataLab