Wkhtmltopdf doesn't support displaying multiple fonts that aren't google font. This problem would be due to incorrect properties set when creating fonts. Here is how to insert a non google font in wkhtmltopdf.
First, your font name must have a maximum of 8 characters. (e.g: American.ttf)
If you want to integrate a font with its variations (light, regular, bold, extrabold), each of these must be a separate file with a name not exceeding 8 characters (e.g: AmeBold.ttf for the Bold variation of the American typo).
Install FontForge
After that, go to the FontForge website to download the software and install it on your computer.
- Open the software and select your font to modify
- Go to 'Elements' > "Infos fonte" (ctrl + shift + F)
- Modify this fields : "font name", "font family name", "current name" with the same name of 8 charactere maximum (e.g: American)
- Click on "OK"
Finally, integrate the following code in your CSS :
@font-face {
font-family: 'American';
src: url('../fonts/american.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}