dompdf字体家族问题 [英] dompdf font family issue
问题描述
我使用Bamboo发票作为发票生成器,并且尝试自定义发票模板,但是无论我做什么,字体似乎都无法调整.
I'm using Bamboo invoice as an invoice generator, and I'm trying to customize the invoice template, but no matter what I do, the font just won't seem to adjust.
我现在有
body {
margin: 0.5in;
font-family: 'helvetica';
font-size: 10pt;}
我已经阅读过,并且helvetica是已安装的字体,因此它应该可以工作
I've read up on it, and helvetica is an installed font, so it should work
确保将其更改为'courier';也位于lib/fonts目录中,但是字体保持不变.
to make sure I changed it to 'courier'; which is also in the lib/fonts directory, but the font remains the same.
有帮助吗?
推荐答案
Kinda较晚,但仍适用于Google访问者
我对DomPDF也有类似的问题,但是由于BambooInvoice使用了它,因此...无论如何,DomPDF对于CSS中的字体系列定义有麻烦.我将内联样式应用于顶部div框以解决此问题.
I had a similar problem with DomPDF, but since BambooInvoice uses it... Anyway DomPDF has trouble with the font-family definition in the CSS. I applied inline style to the top div box to solve the problem.
<div id="container" style="font-family:sans-serif;">
....
</div>
这篇关于dompdf字体家族问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!