You're using an early alpha of 0.6.0. Currently 0.6.0 is available in beta and we highly recommend you upgrade to it. You'll need to reload your font, but with the latest version you no longer need to use any external tools. php-font-lib is included and can handle creation of the UFM files. You don't really need the AFM files, though they don't hurt, because more than likely you're going to want to encode in UTF-8 anyways.
Upgrade your dompdf installation and take a look at the Unicode how-to for make sure you're set up correctly.
On Monday, January 28, 2013 7:20:40 PM UTC-5, Bram Peerlings wrote:
Hi all,
I'm using EventEspresso to sell tickets for a festival I'm organizing. The plugin used to generate PDF tickets builds on DOMPDF. I have tried installing a new font, but it does not show up in the PDF. I do not get any errors, though. The version number mentioned in dompdf_config.inc.php is '0.5.1.htischer.20090507'.
I have generated .ufm (http://eclecticgeek.com/dompdf/load_font.php) and .afm (http://www.files-conversion.com/) files and included them, with the .ttf, in the include/lib/fonts folder. Also, I have edited the dompdf_font_family_cache.php file as follows:
'fixed' => array (
'normal' => DOMPDF_FONT_DIR . 'Courier',
'bold' => DOMPDF_FONT_DIR . 'Courier-Bold',
'italic' => DOMPDF_FONT_DIR . 'Courier-Oblique',
'bold_italic' => DOMPDF_FONT_DIR . 'Courier-BoldOblique'
),
'BerlinSansFBDemi' => array (
'normal' => DOMPDF_FONT_DIR . 'BRLNSDB',
'bold' => DOMPDF_FONT_DIR . 'BRLNSDB',
'italic' => DOMPDF_FONT_DIR . 'BRLNSDB',
'bold_italic' => DOMPDF_FONT_DIR . 'BRLNSDB'
)
)
In the CSS file used, the font is declared as follows:
@font-face {
font-family: "BerlinSansFBDemi";
src: url('BRLNSDB.eot');
src: local('?'), url('BRLNSDB.woff') format('woff'), url('BRLNSDB.ttf') format('truetype'), url('BRLNSDB.svg') format('svg');
font-weight: normal;
font-style: normal;
}
In webpages, this works perfectly. However, in the PDF's, it does not show up. Any idea what might be going wrong? If I forgot to mention any information, please let me know!
Thank you so much,
Bram