. // // See LICENSE.TXT file for more information. //============================================================+ /** * @file * Process all TTF files on current directory to build TCPDF compatible font files. * @package com.tecnick.tcpdf * @author Nicola Asuni * @since 2008-12-07 */ // read directory for files (only TTF files). $handle = opendir('.'); while ($file = readdir($handle)) { $path_parts = pathinfo($file); if (isset($path_parts['extension']) AND (strtoupper($path_parts['extension']) === 'TTF')) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { // windows exec('ttf2ufm.exe -a -F '.$path_parts['basename']); } else { // linux exec('./ttf2ufm -a -F '.$path_parts['basename']); } exec('php -q makefont.php '.$path_parts['basename'].' '.$path_parts['filename'].'.ufm'); } } closedir($handle); //============================================================+ // END OF FILE //============================================================+