【发布时间】:2013-08-15 07:44:47
【问题描述】:
似乎 weasyprint 不支持 @font-face css 指令。在使用 weasyprint 生成 pdf 时,是否有不同的方法来指定要使用的字体?
【问题讨论】:
标签: fonts weasyprint
似乎 weasyprint 不支持 @font-face css 指令。在使用 weasyprint 生成 pdf 时,是否有不同的方法来指定要使用的字体?
【问题讨论】:
标签: fonts weasyprint
该指令不受支持。
weasyprint 仅使用当前安装的字体,可以通过 Pango/fontconfig 找到。
这个short C program 将列出所有可以访问的字体。
此命令将测试特定字体名称 (reference):
pango-view -t 'Some test text' --font 'AwesomeFont'
【讨论】:
确保在你的 linux 机器上运行所有 MS 字体。这是我的问题的解决方案!
sudo apt-get install ttf-mscorefonts-installer
【讨论】: