source: trunk/client/inc/hpdf/_fpdf/doc/addfont.htm@ 64

Last change on this file since 64 was 2, checked in by root, 15 years ago

importo il progetto

File size: 1.7 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5<title>AddFont</title>
6<link type="text/css" rel="stylesheet" href="../fpdf.css">
7</head>
8<body>
9<h1>AddFont</h1>
10<code>AddFont(<b>string</b> family [, <b>string</b> style [, <b>string</b> file]])</code>
11<h2>Description</h2>
12Imports a TrueType or Type1 font and makes it available. It is necessary to generate a font
13definition file first with the makefont.php utility.
14<br>
15The definition file (and the font file itself when embedding) must be present in the font directory.
16If it is not found, the error "Could not include font definition file" is generated.
17<h2>Parameters</h2>
18<dl class="param">
19<dt><code>family</code></dt>
20<dd>
21Font family. The name can be chosen arbitrarily. If it is a standard family name, it will
22override the corresponding font.
23</dd>
24<dt><code>style</code></dt>
25<dd>
26Font style. Possible values are (case insensitive):
27<ul>
28<li>empty string: regular</li>
29<li><code>B</code>: bold</li>
30<li><code>I</code>: italic</li>
31<li><code>BI</code> or <code>IB</code>: bold italic</li>
32</ul>
33The default value is regular.
34</dd>
35<dt><code>file</code></dt>
36<dd>
37The font definition file.
38<br>
39By default, the name is built from the family and style, in lower case with no space.
40</dd>
41</dl>
42<h2>Example</h2>
43<div class="doc-source">
44<pre><code>$pdf-&gt;AddFont('Comic','I');</code></pre>
45</div>
46is equivalent to:
47<div class="doc-source">
48<pre><code>$pdf-&gt;AddFont('Comic','I','comici.php');</code></pre>
49</div>
50<h2>See also</h2>
51<a href="setfont.htm">SetFont()</a>.
52<hr style="margin-top:1.5em">
53<div style="text-align:center"><a href="index.htm">Index</a></div>
54</body>
55</html>
Note: See TracBrowser for help on using the repository browser.