xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From knoxorino <p...@knoxor.com>
Subject Embeded Cyrillic Font still showing unicode chars .. HELP!!
Date Wed, 20 Feb 2008 11:12:01 GMT


I am trying to display a Russian text string in pdf but when the pdf is
rendered, the Russian text is displayed as unicode (eg. &#0436; displays as
&amp;#0436; and &#1087; as &amp;#1087; etc..) I have created the font
metrics and embedded the font in my code. When generating the pdf, I can see
the fonts being loaded from my output logs but the fonts are not displaying
correctly. I'm not sure if I have done something wrong or the TTF I am using
is incorrect.

When I apply the Cyrillic font family in my xsl file to an English text
string, I get Russian characters out ok so this makes me believe that the
font is properly embedded and working.

I've tried various methods to get the FontBaseURL but had to eventually put
it into my fontcfg.xml using the <font-base> tag as doing it programatically
(commented out below) did not work. As you can see from the fontcfg file, I
am trying numerous TTF's to try and get this working.

Any help would be greatly appreciated.

I've posted some code below....

        String fontConfig = path + "fonts/fontcfg.xml";
	FopFactory fopFactory = FopFactory.newInstance();
	//fopFactory.setFontBaseURL("file:///" + path + "fonts/");

	FOUserAgent foAgent = fopFactory.newFOUserAgent();
        //Setup a buffer to obtain the content length
        ByteArrayOutputStream out = new ByteArrayOutputStream();

        //Setup FOP
        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,foAgent , out);


http://www.nabble.com/file/p15586777/fontcfg.xml fontcfg.xml 

View this message in context: http://www.nabble.com/Embeded-Cyrillic-Font-still-showing-unicode-chars-..-HELP%21%21-tp15586777p15586777.html
Sent from the FOP - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message