Sam Duvall
Sam Duvall

Reputation: 265

How do I render @font-face in PhantomJS screen capture?

The screen capture is great, but the custom @font-face fonts aren't being rendered. Is it possible to correct this?

Upvotes: 7

Views: 7165

Answers (2)

Arunoda Susiripala
Arunoda Susiripala

Reputation: 2534

I've build PhantomJS with Webfonts support for OSX and Linux - You can use the binaries directly -

Download From: http://arunoda.me/blog/phantomjs-webfonts-build.html

Upvotes: 1

Brad
Brad

Reputation: 321

After doing some research for a bit I found this

http://code.google.com/p/phantomjs/issues/detail?id=247

Looks like SVG works the best.

One problem I ran into while testing a screenshot again after using an SVG version of the font was WebKit caching the old page and still showing the broken fonts. Make sure your server explicitly tells it to not use a cached version, or clean WebKits cache.

Upvotes: 4

Related Questions