Adding dynamically fonts (from a CDN) ?

63 views
Skip to first unread message

Julien G

unread,
Nov 21, 2016, 10:35:30 AM11/21/16
to dompdf
Hi all !
I'm starting to work with Dompdf but i want something i'm not sure can be with this tool. I would want to use Google fonts without having to include them in the files of the software OR i'm looking for a way to do it dynamically from the front.

Are you aware of the possibilities in that case ? Did someone already achieved something like that ?

Thanks in advance

BrianS

unread,
Nov 21, 2016, 10:38:52 AM11/21/16
to dompdf
So long as the font in question comes in TTF format you can use the @font-face CSS declaration to make the font available during rendering. There are some limitations and bugs, some of which will be fixed in the next release. Take a look at that Unicode How-To for an overview.
Reply all
Reply to author
Forward
0 new messages