【发布时间】:2019-09-12 12:30:04
【问题描述】:
所以我将一个对象渲染为 pdf,我想更改我的 pdf 字体。
我的项目
myproject/
|-- myproject
|-- static/
|-- admin/
|-- fonts/
|-- GothamPro-Medium.eot
|-- GothamPro-Medium.ttf
|-- GothamPro-Medium.woff
|-- GothamPro-Medium.woff2
我的页面.html
<style type="text/css">
@page {
size: A4;
}
@font-face {
font-family: 'GothamPro-Medium';
src: url('static/admin/fonts/GothamPro-Medium.woff') format('woff'),
url('static/admin/fonts/GothamPro-Medium.woff2') format('woff2'),
url('static/admin/fonts/GothamPro-Medium.eot?') format('eot'),
url('static/admin/fonts/GothamPro-Medium.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
font-family: 'GothamPro-Medium';
}
</style>
<body>
TESTE
</body>
我的字体不工作,我已经用另一种字体尝试过了,什么都没有
【问题讨论】: