Google fonts and custom Pro Report templates

Hi again, I am still not 100% sure, but I think that the problem comes from the DOMPDF php library that extension uses for generating PDF files. It could be that this library is forcing default font for Headings for some reason, but I found a good workaround.

I think that the best approach is to simply replace <h1> and <h2> tags with <div> and use custom CSS rule to define font-size. For example, this report, I replaced the

<h1>WEBSITE CARE REPORT</h1>

with

<div class="my-h1">WEBSITE CARE REPORT</div>

and just use custom CSS to style the element

.my-h1 {
   font-family: 'Dosis', sans-serif; 
   font-size: 38px;
   text-align:center;
}
2 Likes