com-tecnick-tcpdf
[ class tree: com-tecnick-tcpdf ] [ index: com-tecnick-tcpdf ] [ all elements ]

Source for file makeallttffonts.php

Documentation is available at makeallttffonts.php

  1. <?php
  2. //============================================================+
  3. // File name   : makeallttffonts.php
  4. // Begin       : 2008-12-07
  5. // Last Update : 2010-08-08
  6. //
  7. // Description : Process all TTF files on current directory to 
  8. //               build TCPDF compatible font files.
  9. //
  10. // Author: Nicola Asuni
  11. //
  12. // (c) Copyright:
  13. //               Nicola Asuni
  14. //               Tecnick.com S.r.l.
  15. //               Via della Pace, 11
  16. //               09044 Quartucciu (CA)
  17. //               ITALY
  18. //               www.tecnick.com
  19. //               info@tecnick.com
  20. //
  21. // License: 
  22. //    Copyright (C) 2004-2010  Nicola Asuni - Tecnick.com S.r.l.
  23. //    
  24. // This file is part of TCPDF software library.
  25. //
  26. // TCPDF is free software: you can redistribute it and/or modify it
  27. // under the terms of the GNU Lesser General Public License as
  28. // published by the Free Software Foundation, either version 3 of the
  29. // License, or (at your option) any later version.
  30. //
  31. // TCPDF is distributed in the hope that it will be useful, but
  32. // WITHOUT ANY WARRANTY; without even the implied warranty of
  33. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  34. // See the GNU Lesser General Public License for more details.
  35. //
  36. // You should have received a copy of the GNU Lesser General Public License
  37. // along with TCPDF.  If not, see <http://www.gnu.org/licenses/>.
  38. //
  39. // See LICENSE.TXT file for more information.
  40. //============================================================+
  41.  
  42. /**
  43.  * Process all TTF files on current directory to build TCPDF compatible font files.
  44.  * @package com.tecnick.tcpdf
  45.  * @author Nicola Asuni
  46.  * @copyright Copyright &copy; 2004-2009, Nicola Asuni - Tecnick.com S.r.l. - ITALY - www.tecnick.com - info@tecnick.com
  47.  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
  48.  * @link www.tecnick.com
  49.  * @since 2008-12-07
  50.  */
  51.  
  52. /**
  53.  */
  54.  
  55. // read directory for files (only graphics files).
  56. $handle opendir('.');
  57. while($file readdir($handle)) {
  58.     $path_parts pathinfo($file);
  59.     $file_ext strtolower($path_parts['extension']);
  60.     if ($file_ext == 'ttf'{
  61.         exec('./ttf2ufm -a -F '.$path_parts['basename'].'');
  62.         exec('php -q makefont.php '.$path_parts['basename'].' '.$path_parts['filename'].'.ufm');
  63.     }
  64. }
  65. closedir($handle);
  66.  
  67. //============================================================+
  68. // END OF FILE                                                 
  69. //============================================================+

Documentation generated on Sun, 27 Feb 2011 16:32:34 -0800 by phpDocumentor 1.4.3