title: Reportlab pdfgen support for bold truetype fonts
body: <p>I have been using reportlab pdfgen to create dynamic pdf documents for printing. It has been working very well for a number of years. </p>
  
  <p>We are having a fund raising event coming up, and wish to generate pdf receipts with the 'theme' font we are using (specifically talldeco.ttf). </p>
  
  <p>I have set the font no problem using the following:</p>
  
  <pre><code>        from reportlab.pdfbase import pdfmetrics 
          from reportlab.pdfbase.ttfonts import TTFont 
          ttfFile = "/usr/share/fonts/truetype/ttf-tall-deco/TALLDECO.TTF"
          pdfmetrics.registerFont(TTFont("TallDeco", ttfFile))
          p.setFont("TallDeco", 18) # Was Times-Bold...
  </code></pre>
  
  <p>Now comes the issue: some of the text needs to be bold and italics, and the talldeco just comes with 1 file (unlike some of the other fonts). I can bold and italicize text in this font in openoffice. </p>
  
  <p>Per the reportlab users guide (http://www.reportlab.com/software/opensource/rl-toolkit/guide/) page 53, it should be possible and they show some code and the results, but our software is using drawString calls instead of paragraphs. A test app based on the sample noted above:</p>
  
  <pre><code>        from reportlab.pdfbase import pdfmetrics 
          from reportlab.pdfbase.ttfonts import TTFont 
          from reportlab.pdfbase.pdfmetrics import registerFontFamily
          ttfFile = "/usr/share/fonts/truetype/ttf-tall-deco/TALLDECO.TTF"
          pdfmetrics.registerFont(TTFont("TallDeco", ttfFile))
          registerFontFamily('TallDeco',normal='TallDeco',bold='TallDeco-Bold',italic='TallDeco-Italic',boldItalic='TallDeco-BoldItalic')
          p.setFont("TallDeco-Bold", 18) # Was Times-Bold...
  </code></pre>
  
  <p>Just gives a Key Error on 'TallDeco-Bold'.</p>
  
  <p>Any suggestions?</p>