I managed to generate the PDF finally (without embedding the font). The font
we referred to is OCR-B-1. But Acrobat Reader displays illegible characters.
The font type listed under the "Fonts" information shows it as True Type
(CID). I reckon CID fonts are not supported by FOP at this point of time (as
stated by Satoshi Ishigami in a separate post).

I managed to get the Font embedding to work in Cocoon after adding a line in
org/apache/fop/configuration/ConfigurationParser (endElement method). Not
sure whether this is a bug or not. But after adding this line, font
embedding works in Cocoon. 

Maybe I'll post this in Cocoon list too.

Thanks
Satish

----------------------------------------------------------------------------
-----------

public void endElement(String s, String s1, String s2)
    {
        if(s1.equals("entry"))
        {
            switch(datatype)
            {
            case 0: // '\0'
                store(role, key, value);
                break;

            case 1: // '\001'
                store(role, key, list);
                break;

            case 2: // '\002'
                store(role, key, map);
                break;
            }
            status = 0;
            role = "standard";
            if(keyStack.size() > 0)
                keyStack.removeElementAt(keyStack.size() - 1);
            if(keyStack.size() > 0)
                key = (String)keyStack.elementAt(keyStack.size() - 1);
            else
                key = "";
            value = "";
        } else
        if(s1.equals("subentry"))
        {
            map.put(subkey, value);
            status -= 16;
            if(keyStack.size() > 0)
                keyStack.removeElementAt(keyStack.size() - 1);
            if(keyStack.size() > 0)
                key = (String)keyStack.elementAt(keyStack.size() - 1);
            else
                key = "";
            value = "";
        } else
        if(s1.equals("key"))
        {
            status -= 2;
            keyStack.addElement(key);
        } else
        if(s1.equals("list"))
        {
            status -= 8;
            value = "";
        } else
        if(s1.equals("value"))
            status -= 4;
        else
        if(s1.equals("fonts") && fontList.size()!= 0)  // Line Added 
            store("standard", "fonts", fontList);
        else
        if(s1.equals("font"))
        {
            fontInfo = new FontInfo(fontName, metricsFile, kerning,
fontTriplets, embedFile);
            fontList.addElement(fontInfo);
            fontTriplets = null;
            metricsFile = null;
            embedFile = null;
            fontName = null;
            kerningAsString = "";
        } else
        {
            s1.equals("font-triplet");
        }
    }




        -----Original Message-----
        From:   Jeremias Maerki [SMTP:[EMAIL PROTECTED]]
        Sent:   Monday, February 18, 2002 6:21 PM
        To:     [EMAIL PROTECTED]
        Subject:        Re: Embedding fonts - works from command line FOP
but not in Coco on 2

        This looks good. I wonder where the string "- error" comes from.
You've
        probably double-checked that the userconfig.xml can be loaded from
where
        you're running Cocoon. I don't have any more ideas other than to
debug
        it. Sorry. Does anybody else have an idea?

        > Sorry for misquoting. I actually meant "embed-file". And I didn't
remove the
        > metrics file. The following is how my user-config file looks like.
        > 
        > The error I get is "Could not load user-config.xml - error".
        > 
        > User-config.xml:
        > -----------------
        > 
        > <configuration>
        >   <fonts>
        >       <font metrics-file="D:/giro/FG_OCRB1.TTF.xml" kerning="yes">
        >       <font-triplet name="OCRB" style="normal" weight="normal"/>
        >       </font>
        >   </fonts>
        > </configuration>

        Cheers,
        Jeremias Märki

        mailto:[EMAIL PROTECTED]

        OUTLINE AG
        Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
        Fon +41 41 317 20 20 - Fax +41 41 317 20 29
        Internet http://www.outline.ch


        
---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, email: [EMAIL PROTECTED]
************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

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

Reply via email to