} $cn = strlen($font['font']) / $font['height']; if ($cn != $font['max']) { $font['max'] = floor($cn); echo "Attenzione: Da questa posizione ci sono solo {$font['max']} caratteri.\n"; $sz = $cn * $font['max']; $font['font'] = substr($font['font'], 0, $sz); } saveFont($par['o'], $font); exit; } if (isset($par['d']) and isset($par['u'])) { die("C'è qualquadra che non cosa!\n"); } if (isset($par['d'])) { $font = loadFont($par['d']); if (isset($par['h']) and $par['h'] == 8) { $font['height'] = 8; } if (isset($par['h']) and $par['h'] == 16) { $font['height'] = 16; } ob_start(); foreach ($FONTINFOSTRUCT as $k => $v) { $id = $v[0]; $cmd = $v[2]; if ($cmd == '@CHR' and isset($font['map']) and is_array($font['map']) and count($font['map']) > 0) { foreach ($font['map'] as $km => $vm) { echo "@CHR {$km} U" . wordwrap(bin2hex($vm), 4, '-U', true) . "\n"; } continue;
if (!isset($x['font2img'])) die("Il file template deve iniziare con una riga [font2img] per essere vaildo.\n"); $x=$x['font2img']; unset($opt['tpl']); unset($x['tpl']); $opt=array_merge($opt,$x); $x=null; } $fileInput = getValS(@$opt['i']); $fileOutput = getValS(@$opt['o']); if (isset($opt['N'])) { $fileOutput = str_replace('*',pathinfo($fileInput,PATHINFO_FILENAME),$fileOutput); } $font = loadFont($fileInput); $font['width'] = $font['width'] ? $font['width'] : 8; $maxChar = $font['max']; $pixX=getVal(@$opt['pxx'],1); $pixY=getVal(@$opt['pxy'],$pixX); $charXLine = getVal(@$opt['chl'],16); if (isset($opt['mktpl'])) { $tpl = array( 'i' => $fileOutput, 'chw' => $font['width'], 'chh' => $font['height'], 'name' => $font['name'],
if (@$par['info']) { echo "Modalità longMode attivata.\n"; } continue; } if ($a == '' or $b == '' or strpos($a, ' ') !== false or strpos($t0, " {$a} ") === false) { die("Errore parser: Linea " . ($numl + 1) . " {$li}\n"); } ${$a} = valu($b); } } // Lettura dei parametri e verifiche varie. if (!@$par['f']) { die("Manca -f\n"); } $font = loadFont($par['f']) or die("\nErrore nel file del font!\n"); $fontHeight = $font['height']; $fontWidth = $font['width'] ? $font['width'] : 8; if ($correggiFont and $fontHeight == 16) { // Aggiustamento per font 8x16. $stepFreq = 400; $baseFreq = 400; } if (isset($par['r'])) { $sampleRate = valu($par['r']); } if (isset($par['b'])) { $baseFreq = valu($par['b']); } if (isset($par['s'])) { $stepFreq = valu($par['s']);