RSS

Create TCPDF PHP Fonts

10 Dec

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/svnlabs.ttf

* For TrueTypeUnicode

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

# ttf2ufm -a -F svnlabs.ttf

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

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

Uses:

<?php

……..

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

……….

?>

 
15 Comments

Posted by on December 10, 2009 in CentOS, Fedora, Joomla, LAMP, oscommerce, php, Tips, Tricks

 

Tags: , , , ,

15 responses to “Create TCPDF PHP Fonts

  1. Mi

    January 5, 2010 at 10:15 am

    Worked well, thanks!

     
    • mango

      May 9, 2011 at 6:18 am

      hi Mi,
      i do follow this too but not work
      i still get result as(????).
      how should i do.please help me.

       
  2. superrefman

    January 12, 2010 at 9:41 am

    Thank you for this. It is very imformative stuff.

    Cordialy

     
  3. Christoph

    May 19, 2010 at 10:16 am

    Thanks, you saved my day. I was searching for over 2 hours for a way too use arial in my PDFs.

     
  4. Darko

    July 13, 2010 at 8:10 am

    This must be done on Linux or can it be done in Win? 🙂

     
  5. Chung

    July 20, 2010 at 6:33 am

    Hi there, your article is very useful, but I have another problem. I have 3 font files for normal, italic, bold. how can I use it with the same name

     
  6. Tan chhay tha

    November 8, 2010 at 10:38 pm

    Dear ,

    I have problem convert khmer unicode with pdf
    could you tell me the url for downlaod this font

    thank !

     
  7. Robbin

    November 13, 2010 at 2:30 pm

    Hi! I’m trying to convert a TTF on CentOS but when I want to execute the ttf2ufm script it returns an error: -bash: ttf2ufm: command not found. How can I fix this? Thanks!

     
  8. poorna

    December 11, 2010 at 10:53 am

    malayalam font support ? how to convert it to the type in windows system

     
  9. abhi

    February 10, 2011 at 11:24 am

    Hi,
    i want to install Arial font on my pdf but i don’t know how to do it please somebody help me

     
  10. Frenda

    March 17, 2011 at 11:12 pm

    it’s work, but it can’t be bolder or italic at pdf. Why? it can’t be helped

     
  11. mbi

    May 5, 2011 at 9:45 am

    Where I must execute this: php -q makefont.php svnlabs.ttf svnlabs.ufm??

    I have this error: php is not a command

     
  12. sasa

    May 19, 2011 at 10:28 am

    You probbaly have to do this to run php from command line
    http://windows.fyicenter.com/60_PHP_Configuring_PHP_Execution_Environments.html

     
  13. auit

    July 1, 2011 at 12:52 pm

    Hi have a new font converter for txpdf fonts
    http://fonts.snm-portal.com/

     
  14. vuaize

    July 11, 2011 at 10:05 am

     

Leave a comment