parse_svg_config

Function parse_svg_config 

Source
fn parse_svg_config(
    value: Option<&Value>,
    default: SvgImageConfig,
) -> SvgImageConfig
Expand description

Parses SVG image configuration from TOML.

Extracts the [image.svg] section and parses width and height specifications. Width can be specified as:

  • “100%” for percentage of page width
  • “100px” or just “100” for pixel values
  • omitted for auto (original size) Height can be specified as:
  • “100px” or just “100” for pixel values
  • omitted for auto (maintain aspect ratio)