I am trying to use custom fonts in my PDF generated with wkhtmltopdf. I read that you can\'t use google webfonts and that wkhtmltopdf uses truetype .ttf file. Can anyone con
If you have .ttf file or .woff file then use following syntax
@font-face {
font-family: 'Sample Name';
src: url(/PathToFolderWhereContained/fontName.ttf) format('truetype');
}
don't use ttf that will not work rather use full name 'truetype' and if you have .woff then use 'woff' in format. For my case it worked.
However the best practice is to use links to Google fonts API that is best if not getting that matching your criteria then use this above technique it will work