BIRT fontsConfig.xml字体问题 [英] BIRT fontsConfig.xml font issue

查看:426
本文介绍了BIRT fontsConfig.xml字体问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Unix机器上使用BIRT 2.6,所以我有问题写一个字体。



我知道我必须编辑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文件?

    解决方案

    有三种处理问题的方法:


    1. 修改现有的字体.Config.xml
      ---要做到这一点:遵循fontsConfig文件中提供的指导原则。另外,为了jar / unjar fontsConfig,请按照这个帖子:打开/关闭fontsConfig.xml 创建新的fontsConfig.xml文件并从特定位置选择你的选择。
      ---为此,您可以调用engineConfig的setconfig并传递完整的文件路径。

      config.setFontConfig(fontConfig文件URL中的文件:/ / abc / abc);

    2. 将字体添加到您的项目路径中,并使用系统属性从代码中选择。
      ---为此,请拨打以下电话。

      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:

    1. 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
    2. 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);

    3. 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屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆