acorea

random thoughts and little goodies

Dienstag, September 16, 2008

fonts in pdf export

We are using the Zend_Pdf module from Zend Framework to create the PDFs for the contact and lead export functionality.

Sadly, the build-in type1 fonts of Zend_Pdf don't support unicode characters. But we have added the possiblity to include your own fonts (in truetype or opentype format) to display more exotic characters. I got some good results with the DejaVu font that came with OpenOffice on my Ubuntu system. This feature is part of the upcoming beta1 release.

To include your fonts, you have to add the following lines to the config.inc.php in the tine root dir and adjust the paths and embed setting:

'pdfexport' => array(
'fontpath' => '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf',
'fontpathbold' => '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf',
'fontembed' => true
)

Does anybody know a (tt or ot) font that has full unicode support?

Labels: , , , ,

5 Comments:

  • At 5:20 nachm., Anonymous Robert Lischke said…

    Did you try Nimbus Sans L (http://en.wikipedia.org/wiki/Nimbus_Sans_L)? It's a replacement for Helvetica under GPL.

     
  • At 8:55 nachm., Anonymous Gheesh said…

    For unicode fonts, look at http://unifoundry.com

     
  • At 3:39 nachm., Blogger Philipp Schüle said…

    thanks, guys.

    the unifoundry font looks promising but unfortunately we can't add it to the tine 2.0 distribution because of license issues. but if the users want full unicode support in PDFs, we recommend this font.

     
  • At 10:30 vorm., Anonymous renoe said…

    Perhaps the Unicode Font Guide For Free/Libre Open Source Operating Systems gives You some information about unicode fonts (and hopefully the right font).

     
  • At 12:47 vorm., Anonymous Anonym said…

    Segoe UI of Microsoft has full (?) unicode support. And everyone can donwload the word 2007 viewer or powerpoint 2007 viewer, in which the fonts are included. So maybe the link to the MS software should not give any licensing issues...

    http://en.wikipedia.org/wiki/Segoe_UI#Segoe_UI

    Cheers, Markus

     

Kommentar veröffentlichen

<< Home