1
votes

we are using wkhtmltopdf and wkhtmltoimage the latest version (0.12.3). And got a problem with the "Frutiger Neue LT W1G Bold" font. It does work on all normal browsers but after creating a image or pdf with the above mentioned libraries it renders the '0'-char wrong (it has strange roundings inside the '0').

How it should be (Chrome Version 53.0.2785.116 64-bit):

enter image description here

wkhtmltopdf:

enter image description here

wkhtmltoimage:

enter image description here

Maybe someone got the same problem and knows the answer?

I tested a lot of different @font-faces generated with sites like font-squirrel but nothing worked. We tried 'Gotham Medmium'-Font as well and even with that font it got some weird similar renderings.

My html/css:

<html lang="de" xmlns:og="http://ogp.me/ns#">
<head>
    <meta charset="utf-8"/>
    <style>
        html,
        body {
          width: 100%;
          height: 100%;
          margin: 0;
        }
        @font-face {
          font-family: 'frutiger--test';
          src: url(data:font/truetype;charset=utf-8;base64,AAEAAAA....);
          font-weight: normal;
          font-style: normal;
        }
        span {
          font-family: 'frutiger--test';
          font-size: 100px;
          font-weight: normal;
        }
        .test2 {
          font-size: 13px;
          font-weight: normal;
        }
    </style>
</head>
<body>
    <span>01234567890123</span>
    <span class="test2">00004578</span>
</body>

2

2 Answers

1
votes

It could be related to bug fixed in 0.13. So you should just update it.

0
votes

You should try to use non true-type format font. If you have that font in woff2 format it should work just fine.