Returns false, example (bug #25899)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164468 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2004-07-27 16:29:46 +00:00
parent 8605f83d13
commit 61d5f16a07

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imageloadfont">
<refnamediv>
@ -16,6 +16,7 @@
<function>imageloadfont</function> loads a user-defined bitmap
font and returns an identifier for the font (that is always
greater than 5, so it will not conflict with the built-in fonts).
It returns &false; in case of error.
</para>
<para>
The font file format is currently binary and architecture
@ -68,6 +69,24 @@
</tgroup>
</table>
</para>
<para>
<example>
<title>Using imageloadfont</title>
<programlisting role="php">
<![CDATA[
<?php
$im = imagecreate(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);
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>imagefontwidth</function> and
<function>imagefontheight</function>.