如何在我的报告中添加自定义字体。当我生成 pdf 报告时,它不会改变我的字体。
@font-face {
font-family: 'CourierPrime-Regular';
src: local('CourierPrime-Regular'), local('CourierPrime-Regular'),
url('/sales_invoice_report/static/src/fonts/CourierPrime-Regular.ttf') format('truetype');
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="centaur_invoice_template" name="centaur_invoice" inherit_id="web.report_assets_pdf">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/sales_invoice_report/static/src/css/sales_invoice.css" type="text/css"/>
</xpath>
</template>
</data>
</odoo>