32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-16 18:15:09 +00:00
tcpdf/fonts/utils/makeallttffonts.php

71 lines
2.5 KiB
PHP
Raw Normal View History

2009-03-24 18:37:18 +00:00
<?php
//============================================================+
// File name : makeallttffonts.php
// Begin : 2008-12-07
2010-06-18 10:29:17 +00:00
// Last Update : 2010-06-17
2009-03-24 18:37:18 +00:00
//
2010-06-18 10:29:17 +00:00
// Description : Process all TTF files on current directory to
2009-03-24 18:37:18 +00:00
// build TCPDF compatible font files.
//
// Author: Nicola Asuni
//
// (c) Copyright:
// Nicola Asuni
// Tecnick.com S.r.l.
// Via della Pace, 11
// 09044 Quartucciu (CA)
// ITALY
// www.tecnick.com
// info@tecnick.com
//
// License:
2010-06-18 10:29:17 +00:00
// Copyright (C) 2004-2010 Nicola Asuni - Tecnick.com S.r.l.
2009-03-24 18:37:18 +00:00
//
2010-06-18 10:29:17 +00:00
// This file is part of TCPDF software library.
//
// TCPDF is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// TCPDF is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
2009-03-24 18:37:18 +00:00
//============================================================+
/**
* Process all TTF files on current directory to build TCPDF compatible font files.
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @copyright Copyright &copy; 2004-2009, Nicola Asuni - Tecnick.com S.r.l. - ITALY - www.tecnick.com - info@tecnick.com
2010-06-18 10:29:17 +00:00
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
2009-03-24 18:37:18 +00:00
* @link www.tecnick.com
* @since 2008-12-07
*/
/**
2010-06-18 10:29:17 +00:00
*/
2009-03-24 18:37:18 +00:00
// read directory for files (only graphics files).
$handle = opendir('.');
while($file = readdir($handle)) {
$path_parts = pathinfo($file);
$file_ext = strtolower($path_parts['extension']);
2010-06-18 10:29:17 +00:00
if ($file_ext == 'ttf') {
exec('./ttf2ufm -a -F '.$path_parts['basename'].'');
2009-03-24 18:37:18 +00:00
exec('php -q makefont.php '.$path_parts['basename'].' '.$path_parts['filename'].'.ufm');
}
}
2010-06-18 10:29:17 +00:00
closedir($handle);
2009-03-24 18:37:18 +00:00
//============================================================+
// END OF FILE
2010-06-18 10:29:17 +00:00
//============================================================+
?>