OpenERP font-family:条形码中的"Free 3 of 9"在报告webkit中不起作用

Poo*_*oja 16 css webkit mako openerp

我的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>
Run Code Online (Sandbox Code Playgroud)

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

<html>
    <head>
        <style type="text/css">${css}</style>   
    </head>
    <body>
        % for o in objects:
            <p class="barcode39">${o.name}</p>
        % endfor
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

此类data.xml在report_webkit的字段"css" 中声明

.barcode39 {
    font-family: 'Free 3 of 9';
    font-size: 36;
    color: red;
}
Run Code Online (Sandbox Code Playgroud)

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

我已将字体放入/usr/share/fonts/truetype并运行fc-cache -fv.提前致谢.

tsh*_*kus 0

尝试在样式表中添加字体规则。就像是:

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