Closed poletaew closed 1 year ago
Not sure this is the best/recommended way, but I got this to work by adding my custom font to vendor/mpdf/mpdf/src/Config/Fontvariables.php:
'fontdata' => [
"roboto" => [
'R' => "Roboto-Light.ttf",
'B' => "Roboto-Medium.ttf",
'I' => "Roboto-Italic",
'BI' => "Roboto-BoldItalic.ttf",
],
and then setting roboto as font-family in my style.css.
Perfect!
I would expect, that an approach like the startpost should be possible. Maybe some details needs attention there?
Proposals to add other fonts to the configuration of mpdf are welcome. Please let continue the discussion in similar issue #445.
I have custom font on the DokuWiki page. And there is no options to use the same font in PDF. As I see there is hardcoded DejaVu font.
Moreover, after I edited
DokuPDF
class with following codes, it also didn't help:Is there a way to use custom font in dw2pdf?