98 |
- |
1 |
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
|
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>SetTTFPath</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="reference.html" title="PHPlot Function Reference" /><link rel="prev" href="SetTransparentColor.html" title="SetTransparentColor" /><link rel="next" href="SetUseTTF.html" title="SetUseTTF" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetTTFPath</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetTransparentColor.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetUseTTF.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetTTFPath"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetTTFPath</span></h2><p>SetTTFPath — Set the default TrueType font directory</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetTTFPath(<em class="parameter"><code>$path</code></em>)</pre></div><div class="refsect1"><a id="idp1378826932"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetTTFPath</code> sets the directory where
|
|
|
4 |
<a class="xref" href="SetFont.html" title="SetFont"><span class="refentrytitle">SetFont</span></a> and <a class="xref" href="SetFontTTF.html" title="SetFontTTF"><span class="refentrytitle">SetFontTTF</span></a>
|
|
|
5 |
can find TrueType font files.
|
|
|
6 |
</p></div><div class="refsect1"><a id="idp1378828612"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$path</code></em></span></dt><dd><p>
|
|
|
7 |
Full path to a directory containing TrueType fonts.
|
|
|
8 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378830108"></a><h2>Notes</h2><p>
|
|
|
9 |
The default TrueType font directory is '.', meaning fonts will be
|
|
|
10 |
loaded from the directory containing your main PHP script.
|
|
|
11 |
PHPlot also attempts to load fonts without any path, which allows GD
|
|
|
12 |
to try to locate the font using its own internal rules. This works on
|
|
|
13 |
some platforms, but not on others.
|
|
|
14 |
</p><p>
|
|
|
15 |
SetTTFPath does not enable the use of TrueType fonts.
|
|
|
16 |
See the note at the end of the reference for <a class="xref" href="SetUseTTF.html" title="SetUseTTF"><span class="refentrytitle">SetUseTTF</span></a>
|
|
|
17 |
on how to set up and use TrueType fonts.
|
|
|
18 |
</p><p>
|
|
|
19 |
The default TrueType font directory is also used to find an internally-set
|
|
|
20 |
default font. This means that if you use SetTTFPath, but do not specify a
|
|
|
21 |
font name (with <a class="xref" href="SetDefaultTTFont.html" title="SetDefaultTTFont"><span class="refentrytitle">SetDefaultTTFont</span></a>,
|
|
|
22 |
<a class="xref" href="SetFont.html" title="SetFont"><span class="refentrytitle">SetFont</span></a>, or <a class="xref" href="SetFontTTF.html" title="SetFontTTF"><span class="refentrytitle">SetFontTTF</span></a>),
|
|
|
23 |
PHPlot will attempt to select a default font from its internal list, but
|
|
|
24 |
using the directory you specify with SetTTFPath.
|
|
|
25 |
This can be useful on platforms where you are willing to use a default
|
|
|
26 |
font, but the internal GD rules on how to locate fonts do not work.
|
|
|
27 |
</p><p>
|
|
|
28 |
See <a class="xref" href="conc-text.html#conc-text-fonts" title="3.8.3. TrueType Font Selection">Section 3.8.3, “TrueType Font Selection”</a> for more information.
|
|
|
29 |
</p></div><div class="refsect1"><a id="idp1378833932"></a><h2>History</h2><p>
|
|
|
30 |
Use of the default TrueType font directory to locate the initial, default
|
|
|
31 |
font was implemented in PHPlot-5.1.3.
|
|
|
32 |
Also with this release, fonts are first searched for without a path, which
|
|
|
33 |
allows GD to try to locate the font using its internal rules.
|
|
|
34 |
</p><p>
|
|
|
35 |
Starting with PHPlot-5.0rc3, the default TrueType font directory is used both
|
|
|
36 |
for the default font set with <a class="xref" href="SetDefaultTTFont.html" title="SetDefaultTTFont"><span class="refentrytitle">SetDefaultTTFont</span></a> and for
|
|
|
37 |
fonts set with <a class="xref" href="SetFont.html" title="SetFont"><span class="refentrytitle">SetFont</span></a>. Refer to those two functions for
|
|
|
38 |
details.
|
|
|
39 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetTransparentColor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="SetUseTTF.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetTransparentColor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetUseTTF</td></tr></table></div></body></html>
|