I'm using the PHP 3 cake framework and I'm generating a pdf using the DOMPDF library, the problem is that the pdf uses a font that I don't know how to apply,
It is worth mentioning that I create the pdf with html from a controller:
**
$html = "<!DOCTYPE HTML>
<html lang='en'>
<head>
<meta charset='utf-8'>
<style>
@font-face {
font-family: 'Soberana Titular Light';
src: url(\"http://eclecticgeek.com/dompdf/fonts/Elegance.ttf\") format(\"truetype\");
}
</head>
<body>
<div class='contenedor__bg'>
<div class='header'>
<div style='display: inline-block;width: 9.14cm;text-align: left;'>
<img src='img/img__logo--sep.png' style='height: 1.3cm;width: 4.37cm;'>
</div>
<div style='display: inline-block;width: 9.25cm;text-align: right; float: right;'>
<img src='img/logo__dgb__350.png' style='width: 2.3cm;'>
</div>
</div>
<div style='width: 100%;text-align: center;padding: 0.1cm 0;'>
<div style='width: 100%;font-family: SoberanaSans-Ligh;font-size: 10pt;'>SISTEMA EDUCATIVO NACIONAL</div>
**
I already tried to pull a font from the internet, I tried to add the font in webroot/font and get it from there but nothing works for me
Hello, I would like to answer my own question in case someone has the same problem as me. I put the css in the same html and for it to interpret the font path I did it as follows:
The font is saved in the following path webroot/font/
I hope it helps. Thank you!