【发布时间】:2016-09-26 10:04:45
【问题描述】:
我们正在使用最新版本 (0.12.3) 的 wkhtmltopdf 和 wkhtmltoimage。并且遇到了“Frutiger Neue LT W1G Bold”字体的问题。它确实适用于所有普通浏览器,但在使用上述库创建图像或 pdf 后,它会呈现错误的 '0'-char(它在 '0' 内有奇怪的舍入)。
应该如何(Chrome 版本 53.0.2785.116 64 位):
wkhtmltopdf:
wkhtmltoimage:
也许有人遇到同样的问题并且知道答案?
我测试了许多使用 font-squirrel 等网站生成的不同 @font-faces,但没有任何效果。我们也尝试了“Gotham Medmium”-Font,即使使用这种字体,它也得到了一些奇怪的相似效果。
我的html/css:
<html lang="de" xmlns:og="http://ogp.me/ns#">
<head>
<meta charset="utf-8"/>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
}
@font-face {
font-family: 'frutiger--test';
src: url(data:font/truetype;charset=utf-8;base64,AAEAAAA....);
font-weight: normal;
font-style: normal;
}
span {
font-family: 'frutiger--test';
font-size: 100px;
font-weight: normal;
}
.test2 {
font-size: 13px;
font-weight: normal;
}
</style>
</head>
<body>
<span>01234567890123</span>
<span class="test2">00004578</span>
</body>
【问题讨论】:
标签: wkhtmltopdf wkhtmltoimage phpwkhtmltopdf