aidan Fri Dec 17 22:49:03 2004 EDT
Modified files:
/phpdoc/en/reference/image/functions imagettftext.xml
Log:
Refined a couple of comments
http://cvs.php.net/diff.php/phpdoc/en/reference/image/functions/imagettftext.xml?r1=1.14&r2=1.15&ty=u
Index: phpdoc/en/reference/image/functions/imagettftext.xml
diff -u phpdoc/en/reference/image/functions/imagettftext.xml:1.14
phpdoc/en/reference/image/functions/imagettftext.xml:1.15
--- phpdoc/en/reference/image/functions/imagettftext.xml:1.14 Tue Nov 16
04:33:43 2004
+++ phpdoc/en/reference/image/functions/imagettftext.xml Fri Dec 17
22:49:03 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Revision: 1.14 $ -->
+<!-- $Revision: 1.15 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
<refentry id="function.imagettftext">
<refnamediv>
@@ -88,18 +88,34 @@
The path to the TrueType font you wish to use.
</simpara>
<simpara>
- Depending on which version of the GD library that PHP is using, when
+ Depending on which version of the GD library PHP is using,
<emphasis>when
<parameter>fontfile</parameter> does not begin with a leading
- <literal>/</literal> then <literal>.ttf</literal> will be appended
+ <literal>/</literal> then <literal>.ttf</literal> will be
appended</emphasis>
to the filename and the library will attempt to search for that
filename along a library-defined font path.
</simpara>
<simpara>
- When using versions of the GD library lower than 2.0.18, a "space"
character,
- rather than a semicolon, was used to define alternate paths to the
font files.
+ When using versions of the GD library lower than 2.0.18, a
<literal>space</literal> character,
+ rather than a semicolon, was used as the 'path separator' for
different font files.
Unintentional use of this feature will result in the warning message:
- <literal>Warning: Could not find/open font</literal>.
+ <literal>Warning: Could not find/open font</literal>. For these
affected versions, the
+ only solution is moving the font to a path which does not contain
spaces.
</simpara>
+ <para>
+ In many cases where a font resides in the same directory as the
script using it
+ the following trick will alleviate any include problems.
+ <programlisting role="php">
+<![CDATA[
+<?php
+// Set the enviroment variable for GD
+putenv('GDFONTPATH=' . realpath('.'));
+
+// Name the font to be used (note the lack of the .ttf extension)
+$font = 'SomeFont';
+?>
+]]>
+ </programlisting>
+ </para>
</listitem>
</varlistentry>
<varlistentry>