ez.no / ezpublish / documentation / incoming / truetype font in pdf
These documentation pages are no longer maintained. Please visit the new documentation site.
The aim of this document is to provide a complete description on how to embed custom fonts into a PDF document.
- ttf2afm - available in the PDFTex utils http://www.tug.org/applications/pdftex/.
- afm2font.php - script made by eZ systems
The lines describing the character should look something like this :
C 67 ; WX 537 ; N C ; B 50 -11 524 701 ; C 68 ; WX 574 ; N D ; B 84 0 522 689 ;
If all the lines start with C -1 you need to manually replace the -1 with the character offset.
Run afm2font.php with the font name as the only parameter. Example:
php afm2font.php Times-Roman
A file calles php_Times-Roman.php should now have been created.
Copy the .ttf and the .font file created into lib/ezpdf/classes/fonts/.
The Font is now available for usage, and will automaticly be embeded in the PDF document.
Comments
I cannot find ttf2afm
Nguyen Tien Hy
Tuesday 22 November 2005 12:58:24 pm
I cannot find anything like "ttf2afm".
The document was old?
Install new fonts?
Frederik Holljen
Wednesday 28 July 2004 9:49:07 am