title: TCPDF, "Could not include font definition file" with OpenType fonts
body: <p>I am a web programmer with no in-depth knowledge of fonts and am struggling to get TCPDF to include our custom OpenType font. We have bought OpenType font files (.oft), which are not protected by any kind of DRM.</p>
  
  <p>A lot of questions regarding this error message end up getting the same advice. I've set the correct file permissions for the folders used by TCPDF (755) and I have no trouble using the <code>addTTFfont()</code> to including .ttf TrueType fonts like so:</p>
  
  <p><code>$pdf-&gt;addTTFfont('/path-to-font/DejaVuSans.ttf', 'TrueTypeUnicode', '', 32);</code></p>
  
  <p>So I've made up the following code to include our OpenFont type. The <code>addTTFfont()</code> documentation seems to indicate support of OpenTypeUnicode and OpenType parameters.</p>
  
  <p><code>$pdf-&gt;addTTFfont('/path-to-font/customfont.otf', 'OpenTypeUnicode', '', 96);</code></p>
  
  <p>Which results in:</p>
  
  <p><code>TCPDF ERROR: Could not include font definition file:</code></p>
  
  <p>We're using TCPDF v6.0.020 and I've been reading the <a href="http://www.tcpdf.org/fonts.php" rel="noreferrer">TCPDF Fonts information page</a> with no luck so far. I've noticed TCPDF also has the <code>addFont()</code> function <a href="http://www.tcpdf.org/doc/code/classTCPDF.html#a06cba4fc5e83b02bb37a947e56196776" rel="noreferrer">(documentation here)</a> which seems more obvious to use as it does not include any reference to any font type. However, I was unable to get this function to work with the little documentation it has.</p>
  
  <p>Any help would be greatly appreciated.</p>