Refined a couple of comments

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@175007 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Aidan Lister 2004-12-18 03:49:03 +00:00
parent 1c26c33f2d
commit 1d3d8d704c

View file

@ -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>