how can I add custom font in my report. It doesn't change my font when I generate a pdf report.
@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>
Already solved. I import the font from Google font.
<xpath expr="." position="inside">
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap" rel="stylesheet" />
</xpath>