Create TCPDF PHP Fonts

On December 10, 2009, in CentOS, Fedora, Joomla, Oscommerce, PHP, Tips, Tricks, by phpsolutions

TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts.

You will find font creation utility at fonts/utils of TCPDF… copy desired font to fonts/utils/phpsolutions.ttf

* For TrueTypeUnicode

# cd /var/www/html/tcpdf/fonts/utils

# ttf2ufm -a -F phpsolutions.ttf

# php -q makefont.php phpsolutions.ttf phpsolutions.ufm

* For embedded fonts to tcpdf PDF file.. copy the resulting phpsolutions.php, phpsolutions.z and phpsolutions.ctg.z to fonts folder

Uses:

<?php

……..

$pdf->SetFont(‘phpsolutions’,’I’,8);

……….

?>

One Response to Create TCPDF PHP Fonts

  1. Anonymous says:

    Wow, that’s quite a nice read!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.