PDF_set_font

PDF_set_font -- Selects a font face and size

Description

void pdf_set_font(int pdf document, string font name, double size, int encoding);

The PDF_set_font() function sets the current font face, font size and encoding. You will need to provide the Adobe Font Metrics (afm-files) for the font in the font path (default is ./fonts). The last parameter encoding can take the following values: 0 = builtin, 1 = pdfdoc, 2 = macroman, 3 = macexpert, 4 = winansi. An encoding greater than 4 and less than 0 will default to winansi. winansi is often a good choice.

Note: This function does not need the afm files for winansi encoding if pdflib 2.0 support is activated.