【发布时间】:2019-07-29 02:58:37
【问题描述】:
我在 django 有一个项目,我想将一些文本呈现为 pdf。它已经在工作,但现在我需要更改我的字体。我在 pc 上安装了Gotham 字体,我用于所有文档,但现在我想用Gotham 字体呈现我的 pdf。
我下载字体并放入我的templates 文件夹:
myproject/
|-- myproject
|-- templates/
|-- admin/
|-- font/
|-- GothamBookItalic.ttf
|-- GothamBookLight.ttf
|-- GothamBookLIghtItalic.ttf
|-- GothamBookMedium.ttf
这是我html的css
@font-face {
font-family: GothamMedium;
src: url('/font/GothamMedium.ttf') format('truetype');
}
但不工作,我不知道我需要做什么。
【问题讨论】: