title: setFont in ReportLab, Django
body: <p>I want to set cyrillic font in reportLab for my pdf file. I found some articles about it, for example: </p>
  
  <pre><code>pdfmetrics.registerFont(TTFont('VeraBI', 'VeraBI.ttf'))
  
  canvas.setFont('Vera', 32)
  </code></pre>
  
  <p>But the issue is that I don't use canvas. I found this view to create a table, and it's not using <code>canvas</code>. How to set my font?
  `</p>
  
  <pre><code>def print_invoice(request, order_id):
      from reportlab.lib import colors
      from reportlab.lib.pagesizes import A4, inch, landscape
      from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph
      from reportlab.lib.styles import getSampleStyleSheet
      from reportlab.pdfbase import pdfmetrics
      from reportlab.pdfbase.ttfonts import TTFont
      pdfmetrics.registerFont(TTFont('Arimo-Regular', 'static/themes/font/Arimo-Regular.ttf'))
      response = HttpResponse(content_type='application/pdf')
      response['Content-Disposition'] = 'attachment; filename="somefilename.pdf"'
      buff = StringIO()
      menu_pdf = SimpleDocTemplate(buff, pagesize=A4, rightMargin=30,leftMargin=30, topMargin=30,bottomMargin=18)
      menu_pdf.pagesize = landscape(A4)
      elements = []
      data = [
      ["fd", "Price per bottle", "Bottles in package",
       "Price for package", "Number of packages", "Total price"],
      ]
      order = Order.objects.get(pk=order_id)
      for item in order.orderproduct_set.all():
          product = item.product
          array = [product.brand.name, str(product.price), str(product.package.product_amount),
                   str(product.package.package_price), str(item.product_amount), str(item.price)]
          data.append(array)
      #TODO: Get this line right instead of just copying it from the docs
      style = TableStyle([('ALIGN',(1,1),(-2,-2),'RIGHT'),
                             ('TEXTCOLOR',(1,1),(-2,-2),colors.red),
                             ('VALIGN',(0,0),(0,-1),'TOP'),
                             ('TEXTCOLOR',(0,0),(0,-1),colors.blue),
                             ('ALIGN',(0,-1),(-1,-1),'CENTER'),
                             ('VALIGN',(0,-1),(-1,-1),'MIDDLE'),
                             ('TEXTCOLOR',(0,-1),(-1,-1),colors.green),
                             ('INNERGRID', (0,0), (-1,-1), 0.25, colors.black),
                             ('BOX', (0,0), (-1,-1), 0.25, colors.black),
                             ])
      #Configure style and word wrap
      s = getSampleStyleSheet()
      s = s["BodyText"]
      s.wordWrap = 'CJK'
      data2 = [[Paragraph(cell, s) for cell in row] for row in data]
      t = Table(data2)
      t.setStyle(style)
  
  
      #Send the data and build the file
      elements.append(t)
      menu_pdf.build(elements)
      response.write(buff.getvalue())
      buff.close()
      return response
  </code></pre>