i now that my question is many times to find in stackoverflow, but nothing solves my problem. im on a server with centOS running. I created a website which generates a pdf using wkhtmltopdf from command line. I set up this page on a dev server with ubuntu to, and there i have no problems. The thing is: i want to use the font arial in my pdf. I tried all the thins which are described here or in other forums, but nothing helps me.
I read that wkhtmltopdf per default uses the font dejavu. I discovered that the centOS has this font not in /usr/share/fonts/ there is only /usr/share/fonts/msttcore with some fonts in this.
So, one of the fonts in there is the arial. so i tried to make a font-face this way:
@font-face {
font-family: "arialregular";
src: url(file:///usr/share/fonts/msttcore/arial.ttf) format("truetype");
font-weight: normal;
font-style: normal;
}
And in my stylesheet then i use
font-family: 'arialregular';
But the font in the pdf looks very shitty. There are big gaps between some letters, or some letters are overlapping.
This font is so shitty too if i dont use any font-face directive. So i think there is something wrong with the fonts on the centOS installation. Maybe its not. I dont know.
If someone could help or see a posibillity to get this running correctly, please answer.
And sorry for maybe duplicating again this issue. Thanks