imageloadfont

(PHP 4, PHP 5, PHP 7)

imageloadfont — ����һ������

˵��

imageloadfont ( string $file ) : int

imageloadfont() ����һ���û������λͼ���岢���ظ�����ı�ʶ������ֵ���Ǵ��� 5����˲�������������ͻ���� �ڲ������������£��ú������� FALSE ��

�����ļ���ʽĿǰ�Ƕ����Ƶ��Һ�ƽ̨�йء�����ζ��Ӧ���ú������� PHP �Ļ�����ͬ���� CPU �Ļ����������塣

�����ļ���ʽ
�ֽ�λ�� C �������� ˵��
byte 0-3 int �����е��ַ���Ŀ
byte 4-7 int �����е�һ���ַ���ֵ��ͨ���� 32 ����ո�
byte 8-11 int ÿ���ַ���ȵ�����ֵ
byte 12-15 int ÿ���ַ��߶ȵ�����ֵ
byte 16- char �ַ����ݵ����飬ÿ�ַ���ÿ����һ�ֽڣ�һ�� (nchars*width*height) �ֽڡ�

Example #1 ʹ�� imageloadfont

<?php
header
("Content-type: image/png");
$im = imagecreatetruecolor(50, 20);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 0, 0, 49, 19, $white);
$font = imageloadfont("04b.gdf");
imagestring($im, $font, 0, 0, "Hello", $black);
imagepng($im);
?>

�μ� imagefontwidth() �� imagefontheight()��