php-doc-en/reference/image/functions/imageloadfont.xml
Hartmut Holzgraefe 5b9fc29465 revision tags added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-17 06:45:35 +00:00

97 lines
2.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imageloadfont">
<refnamediv>
<refname>imageloadfont</refname>
<refpurpose>Load a new font</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>imageloadfont</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
</methodsynopsis>
<para>
<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).
</para>
<para>
The font file format is currently binary and architecture
dependent. This means you should generate the font files on the
same type of CPU as the machine you are running PHP on.
</para>
<para>
<table>
<title>Font file format</title>
<tgroup cols="3">
<thead>
<row>
<entry>byte position</entry>
<entry>C data type</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>byte 0-3</entry>
<entry>int</entry>
<entry>number of characters in the font</entry>
</row>
<row>
<entry>byte 4-7</entry>
<entry>int</entry>
<entry>
value of first character in the font (often 32 for space)
</entry>
</row>
<row>
<entry>byte 8-11</entry>
<entry>int</entry>
<entry>pixel width of each character</entry>
</row>
<row>
<entry>byte 12-15</entry>
<entry>int</entry>
<entry>pixel height of each character</entry>
</row>
<row>
<entry>byte 16-</entry>
<entry>char</entry>
<entry>
array with character data, one byte per pixel in each
character, for a total of (nchars*width*height) bytes.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
See also <function>imagefontwidth</function> and
<function>imagefontheight</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->