admin
doz
html2pdf_v4.03
htmlpurifier-4.10.0
images
prints
decoders
doc
__construct.htm
acceptpagebreak.htm
addfont.htm
addlink.htm
addpage.htm
aliasnbpages.htm
cell.htm
close.htm
error.htm
footer.htm
fpdf.htm
getpageheight.htm
getpagewidth.htm
getstringwidth.htm
getx.htm
gety.htm
header.htm
image.htm
index.htm
line.htm
link.htm
ln.htm
multicell.htm
output.htm
pageno.htm
rect.htm
setauthor.htm
setautopagebreak.htm
setcompression.htm
setcreator.htm
setdisplaymode.htm
setdrawcolor.htm
setfillcolor.htm
setfont.htm
setfontsize.htm
setkeywords.htm
setleftmargin.htm
setlinewidth.htm
setlink.htm
setmargins.htm
setrightmargin.htm
setsubject.htm
settextcolor.htm
settitle.htm
settopmargin.htm
setx.htm
setxy.htm
sety.htm
text.htm
write.htm
filters
font
makefont
FAQ.htm
LICENSE
NOTICE
Praxisstellen.doc
Praxisstellen_neu.doc
Zustimmung.doc
ali.php
as_utf_class.php
changelog.txt
class.fpdf_table.php
class.multicelltag.php
class.string_tags.php
credits.txt
demo.php
ex.pdf
ex.php
fpdf.css
fpdf.php
fpdf_tpl.php
fpdi.php
fpdi_bridge.php
fpdi_pdf_parser.php
gif.php
histo.htm
html2fpdf.php
htmltoolkit.php
info.htm
install.txt
license.txt
newpdf.pdf
no_img.gif
own.php
pdf_context.php
pdf_parser.php
pdf_table.zip
pdfdoc.pdf
praxisstellen.pdf
praxisstellen.php
source2doc.php
table_def.inc
table_def_zuweis.inc
wrapper_functions.php
zustimmung.pdf
zustimmung.php
prints3
stud
Kennwortwechsel.php
hauptframe.php
htmlpurifier-4.10.0.zip
index.php
index_alt.php
index_db.php
index_frame.htm
index_ldap.php
login.php
logout.php
menuframe.htm
styles_pc.css
testpdf.php
topframe.php
93 lines
3.3 KiB
HTML
Executable File
93 lines
3.3 KiB
HTML
Executable File
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>SetFont</title>
|
|
<link type="text/css" rel="stylesheet" href="../fpdf.css">
|
|
</head>
|
|
<body>
|
|
<h1>SetFont</h1>
|
|
<code>SetFont(<b>string</b> family [, <b>string</b> style [, <b>float</b> size]])</code>
|
|
<h2>Description</h2>
|
|
Sets the font used to print character strings. It is mandatory to call this method
|
|
at least once before printing text or the resulting document would not be valid.
|
|
<br>
|
|
The font can be either a standard one or a font added via the AddFont() method. Standard fonts
|
|
use the Windows encoding cp1252 (Western Europe).
|
|
<br>
|
|
The method can be called before the first page is created and the font is kept from page
|
|
to page.
|
|
<br>
|
|
If you just wish to change the current font size, it is simpler to call SetFontSize().
|
|
<br>
|
|
<br>
|
|
<strong>Note:</strong> the font definition files must be accessible. They are searched successively in:
|
|
<ul>
|
|
<li>The directory defined by the <code>FPDF_FONTPATH</code> constant (if this constant is defined)</li>
|
|
<li>The <code>font</code> directory located in the same directory as <code>fpdf.php</code> (if it exists)</li>
|
|
<li>The directories accessible through <code>include()</code></li>
|
|
</ul>
|
|
Example using <code>FPDF_FONTPATH</code>:
|
|
<div class="doc-source">
|
|
<pre><code>define('FPDF_FONTPATH','/home/www/font');
|
|
require('fpdf.php');</code></pre>
|
|
</div>
|
|
If the file corresponding to the requested font is not found, the error "Could not include font
|
|
definition file" is raised.
|
|
<h2>Parameters</h2>
|
|
<dl class="param">
|
|
<dt><code>family</code></dt>
|
|
<dd>
|
|
Family font. It can be either a name defined by AddFont() or one of the standard families (case
|
|
insensitive):
|
|
<ul>
|
|
<li><code>Courier</code> (fixed-width)</li>
|
|
<li><code>Helvetica</code> or <code>Arial</code> (synonymous; sans serif)</li>
|
|
<li><code>Times</code> (serif)</li>
|
|
<li><code>Symbol</code> (symbolic)</li>
|
|
<li><code>ZapfDingbats</code> (symbolic)</li>
|
|
</ul>
|
|
It is also possible to pass an empty string. In that case, the current family is kept.
|
|
</dd>
|
|
<dt><code>style</code></dt>
|
|
<dd>
|
|
Font style. Possible values are (case insensitive):
|
|
<ul>
|
|
<li>empty string: regular</li>
|
|
<li><code>B</code>: bold</li>
|
|
<li><code>I</code>: italic</li>
|
|
<li><code>U</code>: underline</li>
|
|
</ul>
|
|
or any combination. The default value is regular.
|
|
Bold and italic styles do not apply to <code>Symbol</code> and <code>ZapfDingbats</code>.
|
|
</dd>
|
|
<dt><code>size</code></dt>
|
|
<dd>
|
|
Font size in points.
|
|
<br>
|
|
The default value is the current size. If no size has been specified since the beginning of
|
|
the document, the value taken is 12.
|
|
</dd>
|
|
</dl>
|
|
<h2>Example</h2>
|
|
<div class="doc-source">
|
|
<pre><code>// Times regular 12
|
|
$pdf->SetFont('Times');
|
|
// Arial bold 14
|
|
$pdf->SetFont('Arial','B',14);
|
|
// Removes bold
|
|
$pdf->SetFont('');
|
|
// Times bold, italic and underlined 14
|
|
$pdf->SetFont('Times','BIU');</code></pre>
|
|
</div>
|
|
<h2>See also</h2>
|
|
<a href="addfont.htm">AddFont</a>,
|
|
<a href="setfontsize.htm">SetFontSize</a>,
|
|
<a href="cell.htm">Cell</a>,
|
|
<a href="multicell.htm">MultiCell</a>,
|
|
<a href="write.htm">Write</a>
|
|
<hr style="margin-top:1.5em">
|
|
<div style="text-align:center"><a href="index.htm">Index</a></div>
|
|
</body>
|
|
</html>
|