Forum


Replies: 1   Views: 1095
Font changes when using replacevariablebytext
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 dannyguest  · 05-05-2021 - 09:19

We have recently updated our version of PHPDOCX and since then some of our variable replacements using replaceVariableByText are seeing the font become "Times New Roman" instead of the font "Calibri" which is placeholder is set to in the template. Was this changed? Do we need to do a word fragment for each piece of text and manually set the font? 

We have tried $docx->setDefaultFont('Calibri'); which did not work. 

Any help would be appreciated.