Failed fonts rendering
dimakornev13 opened this issue · comments
Left image is barryvdh/laravel-dompdf (dompdf)
Right image is yours engine.
Font is Gilroy.
Testing code: https://gist.github.com/dimakornev13/5f985353002e8ac7fa87416c93e24394
View is: https://gist.github.com/dimakornev13/334cd2fef173589d7976b3eeeb0ef291
config for enging: https://gist.github.com/dimakornev13/4e563060d54fd25e457724e3bdc08027
How to fix fonts view?
Hello,
I would say that wkhtmltopdf is not able to access some resources (like the font and maybe some css) probably due to wrong urls.
I can't really help you more than this with the provided information.
Thanks to reply. Ok, there is repositoty to reproduce problem.
Steps to reproduce:
- git clone https://github.com/dimakornev13/snappy_pdf_reproduce.git
- composer install
- run php artisan app:test
- see differences between <project_dir>/barry.pdf and <project_dir>/snappy.pdf
Ok, I mis-read and thought you were using https://github.com/barryvdh/laravel-snappy instead of the DOMPdf lib.
From what I see it might be related to an issue loading the font related to wkhtmltopdf or the version you are using of wkhtmltopdf not completely supporting font-face.
Check, for example, wkhtmltopdf/wkhtmltopdf#5156
I'm closing the issue as not related to Snappy itself.