| Apache Linux webd001.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 uid=2234(oyaide) gid=100(users) groups=100(users) server ip : 213.186.33.18 | your ip : 216.73.216.159 safemode OFF > / home / oyaide / www / bill / billnew / facturation / fpdf153 / doc / |
| Filename | /home/oyaide/www/bill/billnew/facturation/fpdf153/doc/setfont.htm |
| Size | 3.35 kb |
| Permission | rwxr-xr-x |
| Owner | oyaide : users |
| Create time | 03-Nov-2008 15:18 |
| Last modified | 31-Dec-2004 21:47 |
| Last accessed | 09-Jul-2008 07:12 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
<!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>
<H2>SetFont</H2>
<TT>SetFont(<B>string</B> family [, <B>string</B> style [, <B>float</B> size]])</TT>
<H4 CLASS='st'>Version</H4>
1.0
<H4 CLASS='st'>Description</H4>
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 Windows encoding cp1252 (Western Europe).
<BR>
The method can be called before the first page is created and the font is retained from page
to page.
<BR>
If you just wish to change the current font size, it is simpler to call SetFontSize().
<BR>
<BR>
<B>Note:</B> the font metric files must be accessible. They are searched successively in:
<UL>
<LI>The directory defined by the <TT>FPDF_FONTPATH</TT> constant (if this constant is defined)
<LI>The <TT>font</TT> directory located in the directory containing <TT>fpdf.php</TT> (if it exists)
<LI>The directories accessible through <TT>include()</TT>
</UL>
Example defining <TT>FPDF_FONTPATH</TT> (note the mandatory trailing slash):
<BR>
<BR>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
define('FPDF_FONTPATH','/home/www/font/');<BR>
require('fpdf.php');
</TT>
</TD></TR></TABLE><BR>
If the file corresponding to the requested font is not found, the error "Could not include
font metric file" is issued.
<H4 CLASS='st'>Parameters</H4>
<TT><U>family</U></TT>
<BLOCKQUOTE>
Family font. It can be either a name defined by AddFont() or one of the standard families (case
insensitive):
<UL>
<LI><TT>Courier</TT> (fixed-width)
<LI><TT>Helvetica</TT> or <TT>Arial</TT> (synonymous; sans serif)
<LI><TT>Times</TT> (serif)
<LI><TT>Symbol</TT> (symbolic)
<LI><TT>ZapfDingbats</TT> (symbolic)
</UL>
It is also possible to pass an empty string. In that case, the current family is retained.
</BLOCKQUOTE>
<TT><U>style</U></TT>
<BLOCKQUOTE>
Font style. Possible values are (case insensitive):
<UL>
<LI>empty string: regular
<LI><TT>B</TT>: bold
<LI><TT>I</TT>: italic
<LI><TT>U</TT>: underline
</UL>
or any combination. The default value is regular.
Bold and italic styles do not apply to <TT>Symbol</TT> and <TT>ZapfDingbats</TT>.
</BLOCKQUOTE>
<TT><U>size</U></TT>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
<H4 CLASS='st'>Example</H4>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
//Times regular 12<BR>
$pdf->SetFont('Times');<BR>
//Arial bold 14<BR>
$pdf->SetFont('Arial','B',14);<BR>
//Removes bold<BR>
$pdf->SetFont('');<BR>
//Times bold, italic and underlined 14<BR>
$pdf->SetFont('Times','BIU');
</TT>
</TD></TR></TABLE><BR>
<H4 CLASS='st'>See also</H4>
<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.2em">
<DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
</BODY>
</HTML>
<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>
<H2>SetFont</H2>
<TT>SetFont(<B>string</B> family [, <B>string</B> style [, <B>float</B> size]])</TT>
<H4 CLASS='st'>Version</H4>
1.0
<H4 CLASS='st'>Description</H4>
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 Windows encoding cp1252 (Western Europe).
<BR>
The method can be called before the first page is created and the font is retained from page
to page.
<BR>
If you just wish to change the current font size, it is simpler to call SetFontSize().
<BR>
<BR>
<B>Note:</B> the font metric files must be accessible. They are searched successively in:
<UL>
<LI>The directory defined by the <TT>FPDF_FONTPATH</TT> constant (if this constant is defined)
<LI>The <TT>font</TT> directory located in the directory containing <TT>fpdf.php</TT> (if it exists)
<LI>The directories accessible through <TT>include()</TT>
</UL>
Example defining <TT>FPDF_FONTPATH</TT> (note the mandatory trailing slash):
<BR>
<BR>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
define('FPDF_FONTPATH','/home/www/font/');<BR>
require('fpdf.php');
</TT>
</TD></TR></TABLE><BR>
If the file corresponding to the requested font is not found, the error "Could not include
font metric file" is issued.
<H4 CLASS='st'>Parameters</H4>
<TT><U>family</U></TT>
<BLOCKQUOTE>
Family font. It can be either a name defined by AddFont() or one of the standard families (case
insensitive):
<UL>
<LI><TT>Courier</TT> (fixed-width)
<LI><TT>Helvetica</TT> or <TT>Arial</TT> (synonymous; sans serif)
<LI><TT>Times</TT> (serif)
<LI><TT>Symbol</TT> (symbolic)
<LI><TT>ZapfDingbats</TT> (symbolic)
</UL>
It is also possible to pass an empty string. In that case, the current family is retained.
</BLOCKQUOTE>
<TT><U>style</U></TT>
<BLOCKQUOTE>
Font style. Possible values are (case insensitive):
<UL>
<LI>empty string: regular
<LI><TT>B</TT>: bold
<LI><TT>I</TT>: italic
<LI><TT>U</TT>: underline
</UL>
or any combination. The default value is regular.
Bold and italic styles do not apply to <TT>Symbol</TT> and <TT>ZapfDingbats</TT>.
</BLOCKQUOTE>
<TT><U>size</U></TT>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
<H4 CLASS='st'>Example</H4>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
//Times regular 12<BR>
$pdf->SetFont('Times');<BR>
//Arial bold 14<BR>
$pdf->SetFont('Arial','B',14);<BR>
//Removes bold<BR>
$pdf->SetFont('');<BR>
//Times bold, italic and underlined 14<BR>
$pdf->SetFont('Times','BIU');
</TT>
</TD></TR></TABLE><BR>
<H4 CLASS='st'>See also</H4>
<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.2em">
<DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
</BODY>
</HTML>