0

I'm using Helvetica Neue UltraLight in my @font-face (licensing issues are taken care of) and it works just fine via the browser. I'm converting to PDF via WKHTMLTOPDF and I'm having trouble on that side.

If I convert via Mac WKHTMLTOPDF 0.10.0 RC2, I get the desired output.

If I convert via CentOS WKHTMLTOPDF 0.10.0 RC2, I get the system font.

I set up a bare bones html file to test. In the header, I have a style tag with the following:

@font-face {
    font-family: 'otf';
    src: url(ul.otf) format("opentype");
    font-weight: normal;
    font-style: normal;
}

Below it I have similar for eot, ttf, woff, svg, otf base64 encoded, and natively via the font-family (it's also installed on the server).

In the body, I have the following for each:

<p style="font-family: 'otf';">OTF: Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>

The most interesting bit is that I'm also including a Google Font (opentype) that is rendering in the browser, Mac PDF and CentOS pdf (trust me, I've been over the syntax again and again!). Does anyone have a hunch on what's going on here?

CentOS PDF Screenshot Mac PDF Screenshot

Chords
  • 6,720
  • 2
  • 39
  • 61
  • Similar (unresolved) question here: http://stackoverflow.com/questions/15746240/helvetica-font-not-working-in-wkhtmltopdf – Chords Jan 03 '14 at 20:05

1 Answers1

0

v0.12.1-dev solves this problem (and introduces new ones that are actively being fixed). Ultimately the bug was in an older version of QT Webkit.

Chords
  • 6,720
  • 2
  • 39
  • 61