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.
- Font
Face Ref - A parsed @font-face reference
- Options
- Minification options.
- QName
- A qualified name (possibly with namespace prefix).
- XmlDeclaration
- XML declaration attributes.
Enums§
Functions§
- extract_
font_ faces - Extract
@font-facerules 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.