PHPExcel: Setting font fallback?

321 views Asked by At

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); 
0

There are 0 answers