Level 11
I believe you've to publish your assets to the public folder and load them from there.
I think it was the way I did it when dealing with DomPDF and Vapor.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Anybody is using DomPDF custom fonts with Laravel Vapor? The fonts are not rendered.
The style inside the blade file is:
<style>
@font-face{
font-family: bebas;
src: url({{storage_path('fonts/bebas.ttf')}}) format("truetype");
font-weight: normal;
}
</style>
I tried added into the controller a custom cache dir to /tmp, like this:
$options = ['fontCache' => '/tmp/','isRemoteEnabled' => true,'isFontSubsettingEnabled' => true];
But it doesn't works. Having the times default font.
Please or to participate in this conversation.