You are here

public static function PdfTemplate::getAvailableFontsCleanList in Views PDF 7.2

Same name and namespace in other branches
  1. 6 views_pdf_template.php \PdfTemplate::getAvailableFontsCleanList()
  2. 7.3 views_pdf_template.php \PdfTemplate::getAvailableFontsCleanList()
  3. 7 views_pdf_template.php \PdfTemplate::getAvailableFontsCleanList()

This method returns a cleaned up version of the font list.

1 call to PdfTemplate::getAvailableFontsCleanList()
views_pdf_get_font_list in ./views_pdf.module
This method can be used to applyaapplypplyget all available fonts.

File

./views_pdf_template.php, line 1037
PDF Class to generate PDFs with native PHP. This class based on FPDF and FPDI.

Class

PdfTemplate
The main class to generate the PDF.

Code

public static function getAvailableFontsCleanList() {
  if (self::$fontListClean != NULL) {
    return self::$fontListClean;
  }
  $clean = self::getAvailableFonts();
  foreach ($clean as $key => $font) {

    // Unset bold, italic, italic/bold fonts
    unset($clean[$key . 'b']);
    unset($clean[$key . 'bi']);
    unset($clean[$key . 'i']);
  }
  self::$fontListClean = $clean;
  return $clean;
}