0

I am currently building reports using PHPExcel and would like to have a nicer-than-Arial font that works consistently across different versions and OSs. I found out you can't embed a font using PHPExcel (or Excel for that matter) so the next logical approach was be setting a font fallback.

I know Excel will do it's own fallback if it can't find the specified font but I was wondering if I could somehow specify my own.

The current font setting looks like this:

$objPHPExcel->getDefaultStyle()->getFont()
    ->setName('Century Gothic')
    ->setSize(12); 

And I was hopping for something like this (which of course doesn't work):

$objPHPExcel->getDefaultStyle()->getFont()
    ->setName('Century Gothic,CenturyGothic,AppleGothic,sans-serif')
    ->setSize(12); 
Community
  • 1
  • 1
Lando
  • 715
  • 6
  • 29
  • PHPExcel certainly doesn't provide any functionality like this because MS Excel doesn't provide any option for this – Mark Baker Nov 12 '14 at 17:02
  • That's what I thought from what I could find in the manuals and elsewhere. Since Century Gothic is generally installed with MS Office and the target audience is mostly Windows based, there should be little need for a fallback. I thought it couldn't hurt to be thorough anyway ;-). – Lando Nov 12 '14 at 17:09

0 Answers0