The Dompdf library is used to export data in PDF format. On the "Fonts for export to pdf" page, you have the option to add your own fonts that can be applied in templates for export.

In the dialog box, enter a font name and select files for different font styles.

After clicking on the "save" button, you will be taken to a test page where you can check the display of text with a new font.

Please note that in version 2.8, the ability to save a DOCX document to PDF has been added, but full conversion has not yet been achieved. For working with documents .docx I am using the PHPWord library. I will keep an eye on updates and I believe that in the future the situation with converting a document to PDF will improve.