Forum


Replies: 9   Views: 5231
List & table fonts change after merging
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 18-05-2016 - 09:04

Hello,

The problem of the documents of this user was that both DOCX had a default font, so the final document used the first default font for the whole document (a DOCX can't have more than one default font).
 
To solve this issue, instead of using:
 
$docx->setDefaultFont("Roboto");

 

you need to set the font family for each content, for example:
 
$docx->addText("Lorem ipsum", array('font' => 'Roboto'));

 

After doing this change all fonts merge fine.
 
Regards.