title: Python Svgwrite and font styles/ sizes
body: <p>I'm trying to make a SVG file connected to a web scraper.</p>
  
  <p>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?</p>
  
  <p>Here's the code I have so far</p>
  
  <pre><code>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_document.rect(insert = (900, 800),
                                     size = ("200px", "100px"),
                                     stroke_width = "1",
                                     stroke = "black",
                                     fill = "rgb(255,255,0)"))
  
  svg_document.add(svg_document.text("Reported Crimes in Sweden",
                                     insert = (410, 50),
                                     fill = "rgb(255,255,0)",
  
                                    #This is the connection to the first line that I'm stuck at
                                    #style = 'style="font-family: Arial; font-size  : 104;'))
  
  print(svg_document.tostring())
  
  svg_document.save()
  </code></pre>