Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I ran into the same problem using dompdf <a href="http://code.google.com/p/dompdf/" rel="nofollow">http://code.google.com/p/dompdf/</a> which uses R&amp;OS PDF Class for rendering so this may help you.</p> <p>If you have a .ttf font skip to step 2.</p> <ol> <li>Upload your font to <a href="http://www.files-conversion.com/font-converter.php" rel="nofollow">http://www.files-conversion.com/font-converter.php</a> (Note: This website does have .afm as an option but the output file was 3mb vs 39kb from fruit-lab) select .ttf and save it.</li> <li>Upload your .ttf to <a href="http://fpdf.fruit-lab.de/" rel="nofollow">http://fpdf.fruit-lab.de/</a> and download the .afm file.</li> <li>Copy both the .ttf and .afm file to your font directory and make sure they are exactly the same name and case!</li> </ol> <p>I had problems with spaces so I used CamelCase and my .ttf extension was uppercase and my .afm extension was lower case. Once I made sure I had the .afm and .ttf named in CamelCase with no spaces and lower case extensions it worked!</p> <p>This is probably dompdf specific, I then had to update dompdf_font_family_cache.dist.php and include my font in the array like so:</p> <pre><code>'testscript' =&gt; array ( 'normal' =&gt; DOMPDF_FONT_DIR . 'TestScript', 'bold' =&gt; DOMPDF_FONT_DIR . 'TestScript', 'italic' =&gt; DOMPDF_FONT_DIR . 'TestScript', 'bold_italic' =&gt; DOMPDF_FONT_DIR . 'TestScript', ) </code></pre> <p>Note: I only wanted one version of the font - not bold, italic etc so I just made them all point to the same font file.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload