Wind Cloud
Wind Cloud

Reputation: 119

Can not load custom font file `.otf` in Laravel-dompdf

Currently I use barryvdh/laravel-dompdf for export pdf in Laravel 5.6, but I have problem about load custom font file.

I can load font file had extension is .ttf by php load_font.php, it work perfect.

But I can not use font file with extension is .otf, the load_font.php can work with this extension but can not use when export pdf.

What did I wrong here, how can I embedded a font file with format is .otf when export PDF? I hope somebody had experience about this problem. Can you help me? thank you so much.

Upvotes: 3

Views: 1783

Answers (1)

Felix H.
Felix H.

Reputation: 1112

What about trying to convert .otf to .ttf format? I think that is the optimal way for your problem.

otf to ttf converter sites,
https://convertio.co/otf-ttf/
https://everythingfonts.com/otf-to-ttf
https://anyconv.com/otf-to-ttf-converter/

Upvotes: 1

Related Questions