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 | /**
|
---|
44 | * Process all TTF files on current directory to build TCPDF compatible font files.
|
---|
45 | * @package com.tecnick.tcpdf
|
---|
46 | * @author Nicola Asuni
|
---|
47 | * @copyright Copyright © 2004-2009, Nicola Asuni - Tecnick.com S.r.l. - ITALY - www.tecnick.com - info@tecnick.com
|
---|
48 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
---|
49 | * @link www.tecnick.com
|
---|
50 | * @since 2008-12-07
|
---|
51 | */
|
---|
52 |
|
---|
53 | /**
|
---|
54 | */
|
---|
55 |
|
---|
56 | // read directory for files (only graphics files).
|
---|
57 | $handle = opendir('.');
|
---|
58 | while($file = readdir($handle)) {
|
---|
59 | $path_parts = pathinfo($file);
|
---|
60 | $file_ext = strtolower($path_parts['extension']);
|
---|
61 | if ($file_ext == 'ttf') {
|
---|
62 | exec('./ttf2ufm -a -F '.$path_parts['basename'].'');
|
---|
63 | exec('php -q makefont.php '.$path_parts['basename'].' '.$path_parts['filename'].'.ufm');
|
---|
64 | }
|
---|
65 | }
|
---|
66 | closedir($handle);
|
---|
67 |
|
---|
68 | //============================================================+
|
---|
69 | // END OF FILE
|
---|
70 | //============================================================+
|
---|
71 | ?>
|
---|