1

I am trying to push one of my projects to production on a digital ocean Ubuntu droplet. I installed Source Sans Pro as a font next to a default font that was already installed called 'dejavu'.

installed fonts.

I already rebuild the cache with: fc-cache -f -v

When I run the command fc-list, I can cleary see that Source Sans Pro is installed (I assume):

enter image description here

After I cleared the cache I also restarted the app with pm2 restart app.js and sudo service nginx restart to make sure the changes had effect.

I use Handlebar.js and Puppeteer to generate an invoice. In that template I use the following code to use this custom font:

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    body {
      font-family: 'SourceSansPro';
      font-stretch: normal;
    }
  </style>
</head>

Anyway, when I generate the invoice, for some reason the pre-installed font is the one that gets rendered:

enter image description here

What do I need to do to use SourceSansPro instead of the already installed dejavu font?

Reinier68
  • 2,450
  • 1
  • 23
  • 47

0 Answers0