I try to generate a PDF using DomPDF (v1.0.2) with Open Sans as a font.
I load Open Sans directly from Google Fonts (which should work according to DomPDF docs) and the resulting PDF seems to be fine.
The issue occurs when printing, apparently the fonts are not properly embedded which breaks the font when printed.
Simplified code example:
$pdf = new Dompdf(new Options([
'defaultPaperSize' => 'a4',
'defaultPaperOrientation' => 'portrait',
'isRemoteEnabled' => true,
'allowUrlFopen' => true,
'isHtml5ParserEnabled' => true
]));
$pdf->loadHtml('
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&display=swap" rel="stylesheet">
<style>
span {
font-family: "Open Sans", sans-serif;
}
</style>
<body>
<span>This should be in Open Sans</span>
</body>
');
$pdf->render();
$pdf->stream();
On screen:
Printed:

