parse_svg_root_dim: Parse a numeric width/height from the root <svg ...> tag
Description
Tries:
width="..." / height="..." (supports px, numbers)
viewBox="minx miny width height" as fallback
Usage
parse_svg_root_dim(svg_content, attr = c("width", "height"))Value
Numeric value (in CSS px) or NA_real_ if not found.
Arguments
- svg_content
Character SVG.
- attr
"width" or "height".