I working with BIRT 2.6 on a Unix machine, therefore I have problems to write a certain font.
I known I must edit the fontsConfig.xml file. But it didn't work: In short I have done this:
<fonts>
<font-aliases>
<mapping name="Arial Narrow" font-family="LiberationSansNarrow-Regular" />
</font-aliases>
<font-paths>
<path path="/../../../fonts" />
</font-paths>
</fonts>
Is this configuration right? Is something missing/wrong?
At all there are four config xml's:
fontsConfig.xml
fontsCconfig_pdf.xml
fontsConfig_win32.xml
fontsConfig_linux.xml
Must I need to change all files, without the win32 file?
There are three ways of handling the problem:
- Modify existing fontsConfig.xml
---To do this: follow the guidelines provided in the documentation of fontsConfig file. Also, in order to jar/unjar fontsConfig, follow this post : To Jar/Unjar fontsConfig.xml
Create your new fontsConfig.xml and pick that from a specific location of your choice.
---To do this, you can call the engineConfig's setconfig and pass the full file path.
config.setFontConfig(fontConfig files URL in file://abc/abc);
Add fonts to your project path and pick that from the code using system properties.
--- To do this, call the following.
FontFactory.registerDirectory( scContext.getRealPath("full folder path") );
This should solve the problem