You are here

function _webform2pdf_get_available_fonts in Webform2PDF 7.4

Get the available fonts for the admin form.

Parameters

string $region: Region of the PDF - e.g. 'header'. This is only for alter hooks.

Return value

array An array of available fonts in the format font_name => Font Name.

2 calls to _webform2pdf_get_available_fonts()
webform2pdf_admin_settings in includes/webform2pdf.settings.inc
Overview form of all components for this webform.
webform2pdf_edit_form in includes/webform2pdf.settings.inc
Overview form of all components for this webform.

File

includes/webform2pdf.settings.inc, line 16
Webform to PDF settings form.

Code

function _webform2pdf_get_available_fonts($region) {
  $fonts = array(
    'helvetica' => 'Helvetica',
    'times' => 'Times',
    'courier' => 'Courier',
    'dejavusans' => 'Dejavu Sans',
    'dejavuserif' => 'Dejavu Serif',
    'freesans' => 'Free Sans',
    'freeserif' => 'Free Serif',
    'freemono' => 'Free Mono',
  );

  // Allow other modules to alter the available fonts.
  drupal_alter('webform2pdf_available_fonts', $fonts, $region);
  return $fonts;
}