use custom fonts with wkhtmltopdf

Since it is a Google Web font you need not to write @font-face in you style sheet just use following link tag in your source code:

<link href="http://fonts.googleapis.com/css?family=Jolly+Lodger" rel="stylesheet" type="text/css">

and

 <style type = "text/css">
    p { font-family: 'Jolly Lodger', cursive; }
</style>

will work.

By the way, in your code you are defining @font-face family as font-family: Jolly; and using it as p { font-family: 'Jolly Lodger', cursive; } that is wrong, because it’s mismatching font-family name.

Leave a Comment

tech