wkhtmltopdf custom font letter spacing

<img src="https://i.stack.imgur.com/XLzxz.png" alt="enter image description here">I'm running wkhtmltopdf on linux server (centos.10.x86_64). I'm trying to add "Times New Roman" font to the page. I see the fonts but on some font sizes it adds <strong>spaces between the letters</strong>. I tried setting the font by installing it on the machine (ttf) or by calling an external odf that I converted from the ttf or by adding it with base64 (css). It looks good on all, but it inserts spaces between the laters. I also tried to the dpi parameter but still the spaces are generated. Generating the same pdf over MAC works perfectly (probably because the font comes with the machine)

Why does it happen and how can it be fixed ?

Thanks.

The image attached describes the bug. No spaces added in each of the fonts group. The following the image text

abcdefg hijklmno pqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ

Answer1:

Was resolved using "svg" font format

人吐槽 人点赞

Recommend

Comment

用户名: 密码:
验证码: 匿名发表

你可以使用这些语言

查看评论:wkhtmltopdf custom font letter spacing