postscript with cyrillic text

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&cent;/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>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>  &lt;configuration&gt;<br>   &nbsp;&nbsp;&nbsp; &lt;fonts&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;font metrics-file="ttfcyrillic.xml" kerning="yes" embed-file="/path/to/arial.ttf"&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;font-triplet name="Arial" style="normal" weight="normal"/&gt;&nbsp;&nbsp; <br>    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/font&gt;<br>   &nbsp;&nbsp;&nbsp; &lt;/fonts&gt;<br>  &lt;/configuration&gt; <br>  <br>  The code is:<br>  <br>  Logger avalonLog = null;<br>  if (avalonLog == null) {<br>   avalonLog = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageHandler.setScreenLogger(avalonLog);<br>  }<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>  FileOutputStream out = new FileOutputStream(new File("/home/user/zzz.ps"));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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> &lt;fo:table-cell&gt;<br> &nbsp;&nbsp;&nbsp; &lt;fo:block font-family="Arial"&gt;some cyrillic text<br> &nbsp;&nbsp;&nbsp; &lt;/fo:block&gt;<br> &lt;/fo:table-cell&gt;<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&cent;/min.
--0-1473096468-1145522773=:32583--

Received on Thursday, 20 April 2006 22:52:03 UTC