Multiple fonts per PDF

Is it possible to have more than one font on a PDF. I’m using a custom font successfully, but use 2 on my invoices.

The following post suggests its technically possible via PDFMake:

Post describing multiple fonts

However I cannot see a way of adding it to the document definition from within Invoice Ninja:
“font”: “$bodyFont”, <= how do I add a second option here?
“fontSize”: “$fontSize”,

I’ve tried changing ‘font’ to ‘fonts’, which is accepted:
“fonts”: [

However when attempting to set the font in the document:
“font”: “Ubuntu”,

The text does not appear. It only appears when you set the text to the default font.

You should be able to set separate body and header fonts on /settings/invoice_design and then use them in the styles.

Thanks Hillel.

I added the second custom font, in the same way I added the first one, then specify it as a header font.

When I try to call the font directly “font”: “MyFontName”,

I get “Error: No unicode cmap for font”.

I did notice that the command:
sudo php artisan db:seed --class=FontsSeeder

Didn’t seem to do much (I thought I saw some output last time I ran it).

It could be a problem with the font file.

It works when I create PDF’s from the desktop (Word/Acrobat etc), or is that not relevant?

I ran into the same error, in my case the problem was with the font.