Description
After upgrading from dompdf/dompdf 3.1.0 to 3.1.4, I encountered a font rendering regression when using external Google Fonts loaded via inside the PDF template.
Example font include:
<link href="https://fonts.googleapis.com/css2?family=Almarai:wght@400;700&display=swap" rel="stylesheet">
Observed Behavior
On a new build with no cached fonts, the first PDF render produces broken / corrupted glyphs for the Google font (see attached screenshot of broken text).
On the second render, the font displays correctly (see attached screenshot of correct text).
This behavior did not occur in version 3.1.0.
The issue appeared only after upgrading to 3.1.4, so it seems to be a regression.
Expected Behavior
Google Fonts loaded via should render correctly on the first PDF generation, same as in 3.1.0.