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().