Hello community,
We tried to use a custom font for one of our customer in a rptdesign without success.
A similar question was asked years ago without answer : Import custom font to birt to use in Axelor - #2 par fabiobottan
and another one without answer there : Text on reports displayed with artifacts!
N.B.: working on 5.4 AOP on a 6.1 AOS
For the first try as a proof of concept, KISS, we edited the birt with the new font
<property name="fontFamily">"Carlito"</property>
and in the system we added the font
apt-get fonts-crosextra-carlito
the font can be found there
/usr/share/fonts/truetype/crosextra
-rw-r--r-- 1 root root 816716 Sep 21 2013 Carlito-BoldItalic.ttf
-rw-r--r-- 1 root root 690516 Sep 21 2013 Carlito-Bold.ttf
-rw-r--r-- 1 root root 623416 Sep 21 2013 Carlito-Italic.ttf
-rw-r--r-- 1 root root 635996 Sep 21 2013 Carlito-Regular.ttf
the path is there in the fontsConfig.xml in axelor-core-5.4.10.jar com.axelor.report.fonts
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE font>
<font>
<font-aliases>
<mapping name="serif" font-family="DejaVu Serif" />
<mapping name="sans-serif" font-family="DejaVu Sans" />
<mapping name="monospace" font-family="DejaVu Sans Mono" />
</font-aliases>
<font-paths>
<path path="C:/windows/fonts" />
<path path="/usr/share/fonts/truetype" />
<path path="/usr/share/fonts/TTF" />
</font-paths>
</font>
called by ReportEngineProvider#init
We have no prop reports.fonts.config in the app.prop so the default apply
config.setFontConfig(ResourceUtils.getResource("/com/axelor/report/fonts/fontsConfig.xml"));
Nothing new happened.
We tried to move the font to /usr/share/fonts/TTF with no success
How can we achieve what we want ? What are we missing ?