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 above solution was to install fonts locally on ubuntu and then use phantomjs.

Does anyone have any experience?

+6
source share
1 answer

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

 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

+1
source

All Articles