(PHP 4, PHP 5)
imagefontwidth — Get font width
Returns the pixel width of a character in font.
Returns the width of the pixel
Example #1 Using imagefontwidth() on built-in fonts
<?php
echo 'Font width: ' . imagefontwidth(4);
?>
위 예제의 출력 예시:
Font width: 8
Example #2 Using imagefontwidth() together with imageloadfont()
<?php
// Load a .gdf font
$font = imageloadfont('anonymous.gdf');
echo 'Font width: ' . imagefontwidth($font);
?>
위 예제의 출력 예시:
Font width: 23