Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

bool wxPdfDocument::SetFont ( const wxString &  family,
const wxString &  style = wxEmptyString,
double  size = 0 
) [virtual]

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 Windows encoding cp1252 (Western Europe). The method can be called before the first page is created and the font is retained from page to page. If you just wish to change the current font size, it is simpler to call SetFontSize().

Parameters:
familyFamily font. It can be either a name defined by AddFont() or one of the standard families (case insensitive):

  • Courier (fixed-width)
  • Helvetica or Arial (synonymous; sans serif)
  • Times (serif)
  • Symbol (symbolic)
  • ZapfDingbats (symbolic)

It is also possible to pass an empty string. In that case, the current family is retained.

styleFont style. Possible values are (case insensitive):

  • empty string: regular (default)
  • B: bold
  • I: italic
  • BI or IB: bold italic
  • U: underline or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats
sizeFont 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
See also:
AddFont(), SetFontSize(), Cell(), MultiCell(), Write()

Definition at line 792 of file pdfdoc.cpp.

References SelectFont().

Referenced by AddPage(), wxPdfBarCodeCreator::Barcode(), wxPdfBarCodeCreator::Code39(), wxPdfBarCodeCreator::I25(), WriteXmlCell(), and wxPdfDocument().

{
  return SelectFont(family, style, size, true);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index