Crate svag

Crate svag 

Source
Expand description

svag - An SVG minifier

svag optimizes SVG files while maintaining visual fidelity.

Structs§

Attribute
An attribute on an element.
Document
A complete SVG document.
Element
An SVG/XML element.
FontFaceRef
A parsed @font-face reference
Options
Minification options.
QName
A qualified name (possibly with namespace prefix).
XmlDeclaration
XML declaration attributes.

Enums§

Node
A node in the SVG tree.
SvagError

Functions§

extract_font_faces
Extract @font-face rules from <style> elements
extract_text_chars
Extract all text content from <text> elements in the document
minify
Minify an SVG string with default settings.
minify_with_options
Minify an SVG string with custom options.
optimize
Apply all enabled optimizations to the document.
parse_svg
Parse an SVG string into a Document.
replace_font_url
Replace a font URL in the document’s <style> elements
serialize
Serialize a Document to a minified SVG string.