title: use font in mPDF generated document
body: <p>I would like you to help me with this issue, I'm dealing for the first time with mPDF which I think it's great, but I want to display the report with the same type of font as my web, which on its documentations explains how to achieve this, but it doesn't still seems to work for me.
  What I did till now is:</p>
  
  <ol>
  <li>Add the url to Open Sans from google to my document which will be
  generated after it, <code>&lt;link
  href='http://fonts.googleapis.com/css?family=Open+Sans'
  rel='stylesheet' type='text/css'&gt;</code>.</li>
  <li><p>then I add a style sheet file that contains the use of the font
  <code>&lt;link rel="stylesheet" href="&lt;?php echo base_url();
  ?&gt;assets/publicidad/css/reporte.css" type="text/css"&gt;</code>
  Inside reporte.css that I've already added, I have a definition to use 'Open Sans' font</p>
  
  <p>body {
      font-family: 'Open Sans', Sans-Serif;
  }
  which displays the font as expected.</p></li>
  <li>I Generate the pdf with mPDF which works well but when I want to<br>
  display the Open Sans as the documentation stands, it's not showing the desired font, I downloaded the ttfs file of 'Open Sans' from <a href="http://www.fontsquirrel.com/fonts/open-sans" rel="nofollow">http://www.fontsquirrel.com/fonts/open-sans</a>, and added inside ttfonts folder of mPDF directory as it says within its documentation.</li>
  </ol>
  
  <p><br/>
  After it I follow this clear documentation <a href="http://mpdf1.com/manual/index.php?tid=453" rel="nofollow">http://mpdf1.com/manual/index.php?tid=453</a>, but till now I'm not getting the desired font displayed in my PDF document what I didn't do till now its the part that says "4. To use the font with specific languages, you need also to edit the configuration file (config_cp.php); let us imagine that Frutiger contains a full set of characters needed for the Thai language:", but I don't think that's the problem because I'm using a default configuration which I put down. </p>
  
  <pre><code>function pdf_create($html, $filename, $stream = TRUE) {
              require_once(APPPATH . 'helpers/mpdf/mpdf.php');
              $mpdf = new mPDF();
              $mpdf-&gt;SetAutoFont();
              $mpdf-&gt;WriteHTML($html);
              if ($stream)
              {
                  $mpdf-&gt;Output($filename . '.pdf', 'D');
              }
              else
              {
                  $mpdf-&gt;Output('./uploads/temp/' . $filename . '.pdf', 'F');
  
                  return './uploads/temp/' . $filename . '.pdf';
              }
          }
  </code></pre>
  
  <p>and in my controller I do this.</p>
  
  <pre><code>$html = $this-&gt;load-&gt;view('publicidad/reporte_x_curso', $data, true);
  $this-&gt;load-&gt;helper('mpdf');
  pdf_create($html, 'Reporte_por_cursos', true);
  </code></pre>
  
  <p>(the above isn't being recognized by the stackverflow editor)</p>
  
  <p>And finally what I did till now that should do all I want following the documentation is:</p>
  
  <pre><code>$this-&gt;fontdata = array(
      "'Open Sans'" =&gt; array(
      'R' =&gt; 'OpenSans-Regular.ttf'
      )
  </code></pre>
  
  <p>PD: I put the single quotes because I was adding that way in my html document, but I also tried without them, without success.
  I hope you can help me, thanks in advance.</p>