From d08a74c09b2974ab9db2e4ac12627da62d19f912 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Aug 2013 12:25:45 +0530 Subject: initial repo 13-08-2013 --- pdf/fpdf/doc/setfont.htm | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 pdf/fpdf/doc/setfont.htm (limited to 'pdf/fpdf/doc/setfont.htm') diff --git a/pdf/fpdf/doc/setfont.htm b/pdf/fpdf/doc/setfont.htm new file mode 100755 index 0000000..1cbae91 --- /dev/null +++ b/pdf/fpdf/doc/setfont.htm @@ -0,0 +1,92 @@ + + + + +SetFont + + + +

SetFont

+SetFont(string family [, string style [, float size]]) +

Description

+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. +
+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). +
+The method can be called before the first page is created and the font is kept from page +to page. +
+If you just wish to change the current font size, it is simpler to call SetFontSize(). +
+
+Note: the font definition files must be accessible. They are searched successively in: + +Example using FPDF_FONTPATH: +
+
define('FPDF_FONTPATH','/home/www/font');
+require('fpdf.php');
+
+If the file corresponding to the requested font is not found, the error "Could not include font +definition file" is raised. +

Parameters

+
+
family
+
+Family font. It can be either a name defined by AddFont() or one of the standard families (case +insensitive): + +It is also possible to pass an empty string. In that case, the current family is kept. +
+
style
+
+Font style. Possible values are (case insensitive): + +or any combination. The default value is regular. +Bold and italic styles do not apply to Symbol and ZapfDingbats. +
+
size
+
+Font size in points. +
+The default value is the current size. If no size has been specified since the beginning of +the document, the value taken is 12. +
+
+

Example

+
+
// 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');
+
+

See also

+AddFont(), +SetFontSize(), +Cell(), +MultiCell(), +Write(). +
+
Index
+ + -- cgit