You are here

private function PHPExcel_Writer_Excel2007_Theme::_writeFonts in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Theme.php \PHPExcel_Writer_Excel2007_Theme::_writeFonts()

* Write fonts to XML format * *

Parameters

PHPExcel_Shared_XMLWriter $objWriter: * @param string $latinFont * @param array of string $fontSet * @return string XML Output * @throws PHPExcel_Writer_Exception

1 call to PHPExcel_Writer_Excel2007_Theme::_writeFonts()
PHPExcel_Writer_Excel2007_Theme::writeTheme in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Theme.php
* Write theme to XML format * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Theme.php, line 825

Class

PHPExcel_Writer_Excel2007_Theme
PHPExcel_Writer_Excel2007_Theme

Code

private function _writeFonts($objWriter, $latinFont, $fontSet) {

  // a:latin
  $objWriter
    ->startElement('a:latin');
  $objWriter
    ->writeAttribute('typeface', $latinFont);
  $objWriter
    ->endElement();

  // a:ea
  $objWriter
    ->startElement('a:ea');
  $objWriter
    ->writeAttribute('typeface', '');
  $objWriter
    ->endElement();

  // a:cs
  $objWriter
    ->startElement('a:cs');
  $objWriter
    ->writeAttribute('typeface', '');
  $objWriter
    ->endElement();
  foreach ($fontSet as $fontScript => $typeface) {
    $objWriter
      ->startElement('a:font');
    $objWriter
      ->writeAttribute('script', $fontScript);
    $objWriter
      ->writeAttribute('typeface', $typeface);
    $objWriter
      ->endElement();
  }
}