svgwrite

Python Svgwrite and font styles/ sizes

ぃ、小莉子 提交于 2021-02-18 06:58:11
问题 I'm trying to make a SVG file connected to a web scraper. How do I change font and text size with svgwrite? I understand that I have to define a CSS style and somehow connect that to the text object. But how is this made? Here's the code I have so far import svgwrite svg_document = svgwrite.Drawing(filename = "test-svgwrite3.svg", size = ("1200px", "800px")) #This is the line I'm stuck at #svg_document.add(svg_document.style('style="font-family: Arial; font-size : 34;')) svg_document.add(svg