Installation¶
Install with pip¶
Optional Extras¶
LatticeSVG provides two optional dependency groups:
System Dependencies¶
FreeType¶
LatticeSVG uses freetype-py for precise glyph measurement, which requires the FreeType library on your system.
Cairo (PNG Output Only)¶
For PNG output, you also need the Cairo graphics library:
Verify Installation¶
from latticesvg import GridContainer, TextNode, Renderer
page = GridContainer(style={"width": "200px", "padding": "10px"})
page.add(TextNode("Hello LatticeSVG!"))
Renderer().render(page, "test.svg")
print("✓ LatticeSVG installed successfully")
Development Installation¶
To install from source and contribute: