- From: Emil Petkov <emil_5kov@yahoo.com>
- Date: Thu, 20 Apr 2006 01:46:13 -0700 (PDT)
- To: www-xsl-fo@w3.org
Hello everybody,
I have stumbled upon generating postscript in cyrillic with FOP 0.20.5.
I am using userconfig.xml as follows:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<fonts>
<font metrics-file="ttfcyrillic.xml" kerning="yes" embed-file="/path/to/arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
</fonts>
</configuration>
The code is:
Logger avalonLog = null;
if (avalonLog == null) {
avalonLog = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
MessageHandler.setScreenLogger(avalonLog);
}
//Setup font configuration
File baseDir = new File("someBaseDir");
File userConfiguration = new File(baseDir, "shared/src/foTemplates/userconfig.xml");
Options options = new Options(userConfiguration);
String fontBaseDir = "someFontBaseDir";
org.apache.fop.configuration.Configuration.put("fontBaseDir", fontBaseDir);
FileOutputStream out = new FileOutputStream(new File("/home/user/zzz.ps"));
Driver driver = new Driver(new InputSource( new FileInputStream("/path/to/xml:fo")), out);
driver.setLogger(avalonLog);
driver.setRenderer(Driver.RENDER_PS);
driver.run();
In the xml:fo file, I have the snippet:
<fo:table-cell>
<fo:block font-family="Arial">some cyrillic text
</fo:block>
</fo:table-cell>
Any insights would be helpful. Thanks in advance.
Emil Petkov
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
--0-1473096468-1145522773=:32583
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hello everybody,<br> <br> I have stumbled upon generating postscript in cyrillic with FOP 0.20.5.<br> I am using userconfig.xml as follows:<br> <br> <?xml version="1.0" encoding="UTF-8"?><br> <configuration><br> <fonts><br> <font metrics-file="ttfcyrillic.xml" kerning="yes" embed-file="/path/to/arial.ttf"><br> <font-triplet name="Arial" style="normal" weight="normal"/> <br> </font><br> </fonts><br> </configuration> <br> <br> The code is:<br> <br> Logger avalonLog = null;<br> if (avalonLog == null) {<br> avalonLog = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);<br> MessageHandler.setScreenLogger(avalonLog);<br> }<br> <br> //Setup font
configuration<br> File baseDir = new File("someBaseDir");<br> File userConfiguration = new File(baseDir, "shared/src/foTemplates/userconfig.xml");<br> Options options = new Options(userConfiguration);<br> String fontBaseDir = "someFontBaseDir";<br> org.apache.fop.configuration.Configuration.put("fontBaseDir", fontBaseDir);<br> <br> FileOutputStream out = new FileOutputStream(new File("/home/user/zzz.ps")); <br> Driver driver = new Driver(new InputSource( new FileInputStream("/path/to/xml:fo")), out);<br> driver.setLogger(avalonLog);<br> driver.setRenderer(Driver.RENDER_PS);<br> driver.run();<br> <br> In the xml:fo file, I have the snippet:<br> <br> <fo:table-cell><br> <fo:block font-family="Arial">some cyrillic text<br> </fo:block><br> </fo:table-cell><br> <br> Any insights would be helpful. Thanks in advance.<br> <br>
<br> Emil Petkov<br> <p>
<hr size=1>Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com"> Great rates starting at 1¢/min.
--0-1473096468-1145522773=:32583--
Received on Thursday, 20 April 2006 22:52:03 UTC