I could finally make it work with MS ARIAL UNICODE. What I was missing was
coding in XSL file to explicitly mention font-family="arialuni" .

Thanks to all you guys who replied
Manoj



                                                                                
                                                       
                      [EMAIL PROTECTED]                                         
                                                       
                      -net.com                 To:       [EMAIL PROTECTED]      
                                                 
                                               cc:                              
                                                       
                      2005/02/03 05:02         Subject:  Re: XML ---> PDF 
Japanese                                                     
                      Please respond to                                         
                                                       
                      fop-user                                                  
                                                       
                                                                                
                                                       
                                                                                
                                                       





Manoj:

Try to load your fonts without the userconfig.xml file and see if it works
(change were necessary):

//config fonts
Vector allFonts = new Vector();
Vector allTrips = new Vector();
                  //    name  weight      style
allTrips.add(new FontTriplet("MS Song","normal","normal"));
allTrips.add(new FontTriplet("MS Song","bold","normal"));
allTrips.add(new FontTriplet("MS Song","normal","italic"));
allTrips.add(new FontTriplet("MS Song","bold","italic"));

FontInfo fontInfo = new FontInfo("MS
SONG","/fonts/mssong.xml",true,allTrips,"/fonts/mssong.ttf");

allFonts.add(fontInfo);
Configuration.put("fonts", allFonts);

Then at least you will know if your font files are working.

-Lou

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG-NET, Inc.
The Logistics Network Management System
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 Half Mile Road
Third Floor
Red Bank, NJ 07701
PH: 732-758-6800
FAX: 732-747-7497
http://www.LOG-NET.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIDENTIAL & PRIVILEGED
Unless otherwise indicated or if obvious from the nature of the content,
the information contained herein is privileged and confidential
information/work product. The communication is intended for the use of the
individual or entity named above.  If the reader of this transmission is
not the intended recipient, you are  hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.  If you have received this communication in error, please
notify the sender immediately by telephone (732-758-6800) or by electronic
mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or
otherwise, which you may have of this communication.  Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



                      [EMAIL PROTECTED]

                      ony.com                  To:
[EMAIL PROTECTED]

                                               cc:

                      02/02/2005 18:28         Subject: Re: XML ---> PDF
Japanese
                      Please respond

                      to fop-user










Jay

Thanks for that tip. My machine has the MSGothic.ttc font file which I
understand is used for Japanese characters.


1) From the MSGothic.ttc file, I created the MSGothic.xml file in the
/conf/ directory.

2) I changed the userconfig.xml file to have the Japanese fonts defined as

<font metrics-file="msgothic.xml" embed-file="D:\winnt\font\msgothic.ttc"
kerning="yes">
    <font-triplet name="Gothic" style="normal" weight="normal"/>
    <font-triplet name="Gothic" style="normal" weight="bold"/>
    <font-triplet name="Gothic" style="italic" weight="normal"/>
    <font-triplet name="Gothic" style="italic" weight="bold"/>
 </font>
 <font metrics-file="msmincho.xml" embed-file="Cyberbit.ttf" kerning="yes">
    <font-triplet name="Mincho" style="normal" weight="normal"/>
    <font-triplet name="Mincho" style="normal" weight="bold"/>
    <font-triplet name="Mincho" style="italic" weight="normal"/>
    <font-triplet name="Mincho" style="italic" weight="bold"/>
   </font>

3) In my case FOP is called on the server side ( weblogic ) which has
FOP.JAR in classpath.

       XSLTInputHandler input =  new XSLTInputHandler(xmlFile, new
File(xslParam));
       try {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        response.setContentType(CONTENT_TYPE);
        Driver driver = new Driver();
        String OS = System.getProperty("os.name");
        driver.setLogger(log);
        driver.setRenderer(Driver.RENDER_PDF);
        driver.setOutputStream(out);
        driver.render(input.getParser(), input.getInputSource());

        byte[] content = out.toByteArray();
        response.setContentLength(content.length);
        response.getOutputStream().write(content);
        response.getOutputStream().flush();
        System.out.println("renderXML done");
    } catch (Exception ex) {
        ex.printStackTrace();
        throw new ServletException(ex);
    }

My question is how would FOP on weblogic know how to use the new
userconfig.xml file. I tried to add / update the MSGothic.xml /
userconfig.xml in FOP.JAR but I get read/write permissions errors on the
jar file. Let me know...

Thanks
Manoj







                      [EMAIL PROTECTED]

                                               To:
[EMAIL PROTECTED]

                      2005/02/02 13:25         cc:

                      Please respond to        Subject:  Re: XML ---> PDF
Japanese
                      fop-user







Just a thought:
Did you set up the necessary font-metrics file? You can find an example
(called cid-fonts.fo) in the examples\fo\advanced (Windows) or
examples/fo/advanced (Linux or Unix) directory.

Jay Bryant
Bryant Communication Services
(on contract at Syngergistic Solution Technologies)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to