Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

headless webkit fonts #1

Closed
davatron5000 opened this Issue · 6 comments

5 participants

@davatron5000

This is actually more of an issue for wkhtmltoimage, but I thought it'd be worth noting (since we talked about it) that system font + @font-face support for the headless browser is mediocre. When I get time I'll take another look at it and see if there's a way to get decent font support into wkhtmltoimage, and then document that here.

Feel free to close this. This thing is the jam and I want it to succeed.

@csquared
Owner

Thanks for putting this up here, Dave! I'd definitely like to take a look at my next hack night

@csquared
Owner

found this:
looks like the way to get it to work by doing only one font-family in a style, and it only works with "ttf" fonts.
http://code.google.com/p/wkhtmltopdf/issues/detail?id=145

will test it out and comment

@benschwarz

Was this issue meant to be closed?

@csquared
Owner

Just installing the font on the machine running wkhtmltoimage and using them via the font-family declaration works.

@kretz

Any idea how to solve this when running on Heroku, where installing a font is not an option?

@levberlin

@kretz - you should be able to put a font in your assets folder on Heroku. What I've seen work for wkhtmltopdf is to encode the font in base64 and add that as a font-face in your css, which seems to work for wkhtmltoimage as well, but not in certain cases where there is a fallback font (not sure exactly how/when it stops working).

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.