Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make phantomjs (nodejs system) use local fonts instead of webfonts

I ran into the problem of rendering very large pdf files from html with phantomjs 2.1.1

The mentioned solution was to install fonts locally on ubuntu & then have phantomjs use these.

Does anybody have experience doing this?

like image 741
z.a. Avatar asked Feb 18 '16 16:02

z.a.


1 Answers

You should install the libfreetype6, libfreetype6-dev, libfontconfig1 and libfontconfig1-dev packages:

sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y

You may also need to set the following value in your bash profile:

LC_ALL=en_US.UTF-8

like image 178
duncanhall Avatar answered Nov 07 '22 18:11

duncanhall