Hello,
The replaceVariableByText method doesn't change existing styles, changes are done replacing only the placeholder keeping the current styles.
We have done some quick tests and everything is working correctly. Please send to contact[at]phpdocx.com the most simple script and template that illustrate your issue so we can check them; we need to run them so please send the most simple script without external connections (such as databases, webservices, frameworks...).
The setDefaultFont method sets the default font family in a DOCX that can be overwritten using default styles, custom styles and inline styles.
Regards.