Another font question #44
-
|
What's the difference between the package and Spatie's actual Browsershot package in terms of how Puppeteer works under the hood? As an example, I passed a url to process and Arial font didn't display as well as some alignment issues as well. I actually tested Screeenly and it had the same issues. I used standalone Browsershot with local Puppeteer and everything worked as expected. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hm. Could you maybe a share a code snippet on how to reproduce your issue? In terms of difference between this and the Spatie package:
So basically the only difference is the used version of Puppeteer. https://github.com/stefanzweifel/sidecar-browsershot/blob/main/src/Functions/BrowsershotFunction.php#L47-L51 In the last few weeks I also ran into some weird bugs with the Lambda version of Browsershot. The local Chromium version always worked. Currently thinking about deploying my own layers to all AWS region and building an automated process to keep them always up to date. |
Beta Was this translation helpful? Give feedback.
For completeness: An issue with more details was created in #97, where we discovered that some fonts – like Arial – are not available by default on AWS Lambda.
In #101 we've added support to bundle custom fonts with the Lambda function. Fonts can be placed in
resources/sidecar-browsershot/fonts. During deployment, these fonts are bundled with the function and deployed to AWS Lambda.More on this in the README: https://github.com/stefanzweifel/sidecar-browsershot?tab=readme-ov-file#register-custom-fonts