pub fn validate_svg(svg: &str) -> Result<(), usize>
Returns an error indicating the first position of invalid SVG path data.