<?php
int imagefontwidth ( GdFont|int $font )
where,
$font = The font number
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$arrfw = [ "font 1" => 1, "font 2" => 2,
"font 3" => 3, "font 4" => 4, "font 5" => 5 ];
foreach($arrfw as $f => $fw)
{
echo $f . ' => ' . imagefontwidth($fw) . '<br>';
}
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
// $lang = 'pt';
$lang = 'en';
$var = getcwd();
$gdf_font_name = $var . "/gdf/";
$arqs = glob($gdf_font_name .'*{.gdf,.GDF}', GLOB_BRACE);
foreach($arqs as $v)
{
// echo basename($v) . '<br>';
$gdf_fnt = imageloadfont($v);
$gdf_fnt_width = imagefontwidth ($gdf_fnt);
$pt = $v . "<br>Largura da Fonte: " . $gdf_fnt_width . "px<br><br>";
$en = $v . "<br>Font Width: " . $gdf_fnt_width . "px<br><br>";
echo $$lang;
}
?>