OpenERP字体系列:条形码'Free 3 of 9'在报告webkit中不起作用



WebKit报告.mako文件有问题。当我使用:

<html>
    <head>
        <style type="text/css">${css}</style>  
    </head>
    <body>
        % for o in objects:
            <p style="font-family:'Free 3 of 9';">${o.name}</p>
        % endfor
    </body>
</html>

.mako文件中,它正在工作,但如果我使用

<html>
    <head>
        <style type="text/css">${css}</style>   
    </head>
    <body>
        % for o in objects:
            <p class="barcode39">${o.name}</p>
        % endfor
    </body>
</html>

并且该类在report_webkit 中data.xml的字段"css"中声明

.barcode39 {
    font-family: 'Free 3 of 9';
    font-size: 36;
    color: red;
}

font-family: 'Free 3 of 9'不起作用。如果我使用另一个font-family,它正在工作。可能是什么问题?

我已经在/usr/share/fonts/truetype中放置了字体,并且还运行了fc-cache -fv。提前谢谢。

我也遇到了同样的问题,将字体名称放在单引号中解决了我的问题。例如:-

style="font-family:'Free 3 of 9';"

尝试在样式表中添加字体规则。类似于:

@font-face {
    font-family: 'Free 3 of 9';
    src: url(/usr/share/fonts/truetype/free_3_of_9.woff) format('woff');
}

最新更新