简体   繁体   English

Birt 4.2.2 Linux新字体问题

[英]Birt 4.2.2 new font issue with linux

I am using a new font on Birt 4.2.2 which is working fine on developers Windows machine, but not working on our Linux server which uses Websphere Application Server V8. 我在Birt 4.2.2上使用了一种新字体,该字体在开发人员Windows机器上可以正常工作,但在使用Websphere Application Server V8的Linux服务器上却无法使用。 I have changed the fontsconfig.xml as per this link and I had the same issue. 我已经根据此链接更改了fontsconfig.xml,并且遇到了同样的问题。 Although, I can see that Birt processed my new fonts directory on the application server log file. 虽然,我可以看到Birt在应用程序服务器日志文件上处理了我的新字体目录。 Kindly advise. 好心提醒。

Thanks a lot in advance. 非常感谢。

Just copy your font file under ../jre/lib/fonts directory and run commands "mkfontscale" and "mkfontdir". 只需将您的字体文件复制到../jre/lib/fonts目录下,然后运行命令“ mkfontscale”和“ mkfontdir”。 Restart application server after this. 之后,重新启动应用程序服务器。

I've solved the issue using below steps : 我已经按照以下步骤解决了这个问题:
1- I executed those commands on the fonts directory (mkfontscale - mkfontdir) 1-我在fonts目录(mkfontscale-mkfontdir)上执行了这些命令
2- Then I got the fonts encoding from the output files. 2-然后我从输出文件中得到了字体编码。
Output is something like that : 输出是这样的:
arial.ttf -monotype-arial-medium-r-normal--0-0-0-0-p-0-iso10646-1 arial.ttf -monotype-arial-medium-r-normal--0-0-0-0-p-0-iso10646-1
3- I got iso10646-1 and all other encoding and put them on font-encodings section on fontsconfig.xml file 3-我得到了iso10646-1和所有其他编码,并将它们放在fontsconfig.xml文件的font-encodings部分中
4- Then I added the font names under font-aliases section on fontsconfig.xml 4-然后我在fontsconfig.xml的font-aliases部分下添加了字体名称

And it works fine. 而且效果很好。
The issue was the font encoding wasn't properly set while rendering the PDF for some reason. 问题是由于某种原因在渲染PDF时未正确设置字体编码。 So, I mapped the fonts encoding to the font names. 因此,我将字体编码映射到字体名称。

Thanks a lot for all who replied. 非常感谢所有答复的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM