BIRT fontsConfig.xml字体问题 [英] BIRT fontsConfig.xml font issue
问题描述
我知道我必须编辑fontsConfig.xml文件。但是它没有奏效:总之,我已经这样做了:
< fonts>
< font-aliases>
< mapping name =Arial Narrowfont-family =LiberationSansNarrow-Regular/>
< / font-aliases>
< font-paths>
< / font-paths>
< / fonts>
这个配置是否正确?有什么缺失/错误?
总共有四个配置xml:
$ b $ ul
fontsConfig。 xml
fontsCconfig_pdf.xml
fontsConfig_linux.xml
我是否需要更改所有文件win32文件?
有三种处理问题的方法:
- 修改现有的字体.Config.xml
---要做到这一点:遵循fontsConfig文件中提供的指导原则。另外,为了jar / unjar fontsConfig,请按照这个帖子:打开/关闭fontsConfig.xml 创建新的fontsConfig.xml文件并从特定位置选择你的选择。
---为此,您可以调用engineConfig的setconfig并传递完整的文件路径。
config.setFontConfig(fontConfig文件URL中的文件:/ / abc / abc);
-
将字体添加到您的项目路径中,并使用系统属性从代码中选择。
---为此,请拨打以下电话。
FontFactory.registerDirectory(scContext.getRealPath(full folder path));
这应该解决问题
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
这篇关于BIRT fontsConfig.xml字体问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!