大家好
我使用wkhtmltopdf碰到了字型沒有被載入的問題
把問題簡化了一下
網頁使用了自訂字型,CSS如下:
@font-face {
font-family: 'custom';
src: url(customFont.TTF) format("truetype");
font-weight: normal;
font-style: normal;
}
h2 {
line-height: 18px;
margin-top:5px;
margin-bottom:5px;
font-family: 'custom';
}
body內只有一行
<h2>這是標題</h2>
網頁編碼是BIG5(原本想弄UTF8但該字型檔是拿來擴充BIG5字集的只好配合)
寫在<head>標籤中:<meta charset="BIG5">
這網頁直接用chrome開,可以看到字型變化
但是使用wkhtmltopdf轉換後,卻仍是新細明體
卡好久了,請問wkhtmltopdf要使用自訂字型是否有什麼特殊的注意事項呢?
謝謝各位