Odoo Help


Could not locate font DejaVuSans

on 1/29/15, 11:24 AM 1,799 views

Some reports wich use DejaVuSans font couldn't be printed because of missing this font in system.

when i try to print a report, i got this error message :

openerp.report.render.rml2pdf.trml2pdf: Could not locate font DejaVuSans, substituting default: None

How can I fixed this error ?

Hammad H Qureshi
On 2/22/16, 6:04 AM

I got the same issue in Odoo 9 for handling custom fonts in RML reports. I have solved this problem by giving full font path in openerp/report/render/rml2pdf/customfonts.py. In the third element of tuple in CustomTTFonts in customfonts.py, rather than just to pass the name of the custom font use full path.  

THSarabun', "THSarabun", "/usr/share/fonts/truetype/THSarabun/THSarabun.ttf", 'normal')..


CustomTTFonts = [          ('Sun-ExtA',"Sun-ExtA", "/usr/share/fonts/truetype/Sun-ExtA.ttf", 'normal'),        ('THSarabun', "THSarabun", "/usr/share/fonts/truetype/THSarabun/THSarabun.ttf", 'normal'),        ('THSarabun Bold', "THSarabun Bold", "/usr/share/fonts/truetype/THSarabun/THSarabun_Bold.ttf", 'bold'),        ('THSarabun Italic', "THSarabun Italic", "/usr/share/fonts/truetype/THSarabun/THSarabun_Italic.ttf", 'italic'),        ('THSarabun BoldItalic', "THSarabun BoldItalic", "/usr/share/fonts/truetype/THSarabun/THSarabun_BoldItalic.ttf", 'bolditalic'),]

Hope this will work.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/29/15, 11:24 AM
Seen: 1799 times
Last updated: 2/22/16, 8:19 AM