PageRenderTime 25ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/common/libraries/plugin/html2pdf/_tcpdf/fonts/utils/makeallttffonts.php

https://bitbucket.org/chamilo/chamilo-dev/
PHP | 74 lines | 14 code | 5 blank | 55 comment | 3 complexity | 2d6c58bf70d6b12f05c376441eac935b MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, LGPL-3.0, GPL-3.0, MIT
  1. <?php
  2. //============================================================+
  3. // File name : makeallttffonts.php
  4. // Begin : 2008-12-07
  5. // Last Update : 2008-12-07
  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-2009 Nicola Asuni - Tecnick.com S.r.l.
  23. //
  24. // This program is free software: you can redistribute it and/or modify
  25. // it under the terms of the GNU General Public License as published by
  26. // the Free Software Foundation, either version 3 of the License, or
  27. // (at your option) any later version.
  28. //
  29. // This program is distributed in the hope that it will be useful,
  30. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. // GNU General Public License for more details.
  33. //
  34. // You should have received a copy of the GNU General Public License
  35. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  36. //
  37. // Additionally, you can't remove the original TCExam logo, copyrights statements
  38. // and links to Tecnick.com and TCExam websites.
  39. //
  40. // See LICENSE.TXT file for more information.
  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/gpl.html GNU General Public License
  48. * @link www.tecnick.com
  49. * @since 2008-12-07
  50. */
  51. /**
  52. */
  53. // read directory for files (only graphics files).
  54. $handle = opendir('.');
  55. while ($file = readdir($handle))
  56. {
  57. $path_parts = pathinfo($file);
  58. $file_ext = strtolower($path_parts['extension']);
  59. if ($file_ext == 'ttf')
  60. {
  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. // END OF FILE
  68. //============================================================+
  69. ?>