Hello, I encountered a warn when using prince to generate a pdf with Chinese characters:
prince: HYShuHunJ.ttf: warning: font has no family name
prince: page 1: warning: no font for CJK character U+6C49, fallback to '?'
prince: page 1: warning: no font for CJK character U+4EEA, fallback to '?'
prince: page 1: warning: no font for CJK character U+4E66, fallback to '?'
prince: page 1: warning: no font for CJK character U+9B42, fallback to '?'
prince: page 1: warning: no font for CJK character U+4F53, fallback to '?'
Html is as follows:
I got the PDF file, but the characters all turned into question marks.
prince: HYShuHunJ.ttf: warning: font has no family name
prince: page 1: warning: no font for CJK character U+6C49, fallback to '?'
prince: page 1: warning: no font for CJK character U+4EEA, fallback to '?'
prince: page 1: warning: no font for CJK character U+4E66, fallback to '?'
prince: page 1: warning: no font for CJK character U+9B42, fallback to '?'
prince: page 1: warning: no font for CJK character U+4F53, fallback to '?'
Html is as follows:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
html,body{
overflow:hidden;
margin: 0;
padding: 0;
width:1157.48031496063px;
height: 732.2834645669292px;
font-family:Microsoft YaHei;
transform-origin:left top;
transform:scale(1);
}
@page {
size: 98mm 62mm;
margin: 0;
padding: 0;
}
@prince-pdf {
prince-filter-resolution: 300dpi;
}
image {
prince-image-resolution: 300dpi;
}
.html-wrap {
width:1157.48031496063px;
height: 732.2834645669292px;
margin: 0 auto;
position: absolute;
background-color:#ffffff;
transform-origin:left top;
transform:scale(1);
}
.element-wrap {
position: absolute;
}
.element-item {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
@font-face {font-family: 'font_1';src: url(HYShuHunJ.ttf);}
</style>
</head>
<body>
<div class="html-wrap">
<div class="element-wrap" style="
left:146.79503205195115px;
top:172.0391143807442px;
width:896.59375px;
height:185px;
transform:rotate(0deg);
">
<div class="element-item" style="
transform:scale(1,1);opacity:1;">
<div class="text-element" style="
position:absolute;
left:0;
top:0;
width:100.000%;
height:100.000%;
transform:scale(1.000);
transform-origin:0% 0% 0px;
font-size:12px;
writing-mode:normal;
white-space: nowrap;
word-break:inherit;
">
<font>
<div class="text-wrap" style="font-size: 175px; text-align: center; line-height: 96%; color: rgb(25, 25, 25);">
<div>
<font face="font_1">汉仪书魂体</font>
</div>
</div></font>
</div>
</div>
</div>
</div>
</body>
</html>
I got the PDF file, but the characters all turned into question marks.