Cannot change font in PDF Template, only rendered as Dejavu

Hello, thanks for replying.
I’m working on CRM Suite version 7.10.36
I haven’t seen any errors in the log
I really want to add another font to use in my PDFs
But I’ve come to this post because the same thing is happening to me.
In modules/AOS_PDF_Templates/generatePdf.php
the value is set by default: dejavusanscondensed

            $pdf = new mPDF(
                'en', 
                $template->page_size . $orientation, 
                '', 
                'dejavusanscondensed', 
                $template->margin_left, 
                $template->margin_right, 
                $template->margin_top, 
                $template->margin_bottom, 
                $template->margin_header, 
                $template->margin_footer
            );

Similarly, if this value is removed, the mPDF library applies this by default, this can be seen in modules/AOS_PDF_Templates/PDF_Lib/mpdf.php

I followed these steps to add the font
(I think I followed these steps from here: How to add fonts to the PDF Template editor)
The font called Studio-Pro-Bold.ttf

  1. I add it to the folder modules/AOS_PDF_Templates/PDF_Lib/ttfonts/
  2. in modules/AOS_PDF_Templates/PDF_Lib/config_fonts.php
    I add the font to the array $this->fontdata
$this->fontdata = array(

    'studio' => array(
        'R' => "studio-pro-bold.ttf",
        'B' => "studio-pro-bold.ttf",
        'I' => "studio-pro-bold.ttf",
        'BI' => "studio-pro-bold.ttf",
    ),
...
  1. in modules/AOS_PDF_Templates/PDF_Lib/classes/ttfontsuni.php
    There are some exceptions that occur on lines 110 and 116, if I send a aos_quote to print, I get the error: “Postscript outlines are not supported”
    So I went there and commented out the lines:
    This caused the font files to be generated in: modules/AOS_PDF_Templates/PDF_Lib/ttfontdata
    Then I uncommented the code
        if ($version==0x4F54544F) {
            die("Postscript outlines are not supported");
        }
        if ($version==0x74746366 && !$TTCfontID) {
            die("ERROR - You must define the TTCfontID for a TrueType Collection in config_fonts.php (". $file.")");
        }
        if (!in_array($version, array(0x00010000,0x74727565)) && !$TTCfontID) {
            die("Not a TrueType font: version=".$version);
        }
  1. in modules/AOS_PDF_Templates/views/view.edit.php
    I add the font to tiny.init, in the theme_advanced_fonts property

But none of this worked either… :rofl: