pub fn render_svg_direct(raw: &str, args: &CliArgs) -> Result<String>Expand description
Renders SVG output from raw text and configuration. SDK-friendly rendering entrypoint.
This function is designed for programmatic use, such as:
- WASM bindings
- Python FFI
- Embedded browser demos
It skips all CLI-specific input logic (stdin, --input, --script),
and directly renders an SVG from a raw input string + CliArgs config.
Script mode is disabled internally, and only layout/style-related fields are respected.
§Arguments
raw: Raw input text (e.g."echo hello\\nworld")args: CLI-style arguments (theme, font, layout, etc)
§Returns
Ok(svg_string)on successErr(...)if any step fails (invalid theme, layout error, etc)