title: PDFKit - Custom Fonts - fs.readFileSync is not a function
body: <p>I'm using PDFKit for an application.  I'm just using it in the Browser in an HTML file, with Javascript (no Node.js).</p>
  
  <p>I downloaded PDFKit from GitHub: <a href="https://github.com/devongovett/pdfkit/releases" rel="noreferrer">https://github.com/devongovett/pdfkit/releases</a></p>
  
  <p>as well as Blob Stream: <a href="https://github.com/devongovett/blob-stream" rel="noreferrer">https://github.com/devongovett/blob-stream</a></p>
  
  <p>I'm trying to include a custom font per the documentation like so:</p>
  
  <pre><code>doc.registerFont('Custom Font', 'fonts/GOODDP__.TTF');
  doc.font('Custom Font').fontSize(fontSize).text($("#text1").val(), xPos, yPos, configObj);
  </code></pre>
  
  <p>But I always get this error:</p>
  
  <pre><code> fs.readFileSync is not a function
  </code></pre>
  
  <p>This makes sense because <code>fs.readFileSync</code> is part of node.js, and I'm not using that.  However, the example in the docs say this can be used in the browser.</p>
  
  <p>I know there's also a Browserify option, but I'm not sure how or if that would help in this situation</p>