XSL-FO Foreign Characters (Polish) Unicode in APACHE FOP (V. 1.1)

泄露秘密 提交于 2019-12-04 23:47:48

问题


I have the following xsl-fo code, attempting to produce foreign characters.

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
...
<fo:block font-size="11pt" font-family="calibri" language="pl">    
Odwrotna strona tego pisma zawiera wa&#x017C;ne informacje.  je&#x017C;eli potrzebuje Pan/i pomocy, aby je zrozumie&#x0107;, prosz&#x0119; 
        zadzwoni&#x0107; pod numer X-XXX-XXX-XXXX po bezp&#x0142;atne us&#x0142;ugi j&#x0119;zykowe.
</fo:block>

I've tried every font-type I can think of to access the required unicode characters, but have had no success so far.

Is there something wrong with my formatting? Or the unicode I'm using? Or perhaps I haven't declared my XML properly?

This, and my Korean, Chinese, and Russian unicode characters are the only ones giving me trouble at the moment. Whereas my Spanish and Croatian unicode characters are working fine.


回答1:


If you are having problems displaying special characters in your file you can try defining them in configuration file. Here http://xmlgraphics.apache.org/fop/trunk/output.html#afp-configuration you might find how to do it. Also make sure you have path to your fonts directory correctly specified. In Windows it should look something like that:

<fonts>
      <directory recursive="true">C:\Windows\Fonts</directory>
      <auto-detect/>
</fonts>


来源:https://stackoverflow.com/questions/17956218/xsl-fo-foreign-characters-polish-unicode-in-apache-fop-v-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!