Hi William,

Most of the work involves entering all the charset data for ExpertEncoding and ExpertSubsetEncoding (contained in Appendix C of http://www.adobe.com/devnet/font/pdfs/5176.CFF.pdf) into src/codegen/fonts/encodings.xml - see http://issues.apache.org/bugzilla/show_bug.cgi?id=43143. Its not a difficult job, just quite a long one. If you are able to find the time to do this then I would be more happy get it working for you.

Adrian.

william wrote:
Thanks Adrian,

I wouldn't mind fixing it if there's no one wants to do it. But I would need some guidance on how to and what should I do since I've never followed fop-dev before.

Thanks.

Adrian Cumiskey wrote:
Hi William (and all),

This did turn out to be an encoding problem after all. Unfortunately I do not have the time at the moment to provide a fix for this problem. but I have provided a patch which provides the ability for FOP to correctly identify the type 1 font encoding.

At least now you will be provided with a human readable log error message rather than NullPointerException :-).

Maybe someone could take a look at implementing support for these encoding types? It wouldn't be too difficult, it would mostly involve adding data to src/codegen/fonts/encodings.xml. Most of the background information anyone would require for providing support for these encodings can be found in the patch I provided (http://issues.apache.org/bugzilla/show_bug.cgi?id=43143).

If you are still using a metrics-url in your font configuration then you will need to regenerate your metrics file once this patch has been applied as the font encoding detection is flawed for detecting these encoding types for type 1 fonts in the existing implementation.

Of course font you don't need to specify "metrics-url" attributes in your fop.xconf anymore in the latest trunk code and in the forthcoming 0.94 (and 0.93 if I am correct). You can just provide an embed-url and FOP will generate the metrics on the fly.

e.g.

<font kerning="yes" embed-url="Bundesba.pfb">
    <font-triplet name="Bundesbahn" style="normal" weight="normal"/>
</font>

All the best,

Adrian.

william wrote:
Thanks Adrian and everyone,

I have sent it to you for you to take a look at it (font and FO). if there's something that is useful for me/others to know, please do tell me.

Otherwise, does anyone has any idea where else I can look for software solution that might accommodate this ?

William.

Adrian Cumiskey wrote:
Hi William,

Yes I think that might be the problem, it does look like an encoding problem to me. I took a quick look at the code and the NullPointerException you are experiencing would indicate that the encoding is not recognised by FOP and its failing to provide a CodePointMapping instance which is used internally by SingleByteFont.

If you send me the font (and fo) I will try and take a quick look at it.

Adrian.

william wrote:
Hi All,

First of all, would like to thank you all developers and commiters at FOP. i've been using it for awhile now.

I haven't had problem with embedding fonts before, except on this Bundesbahn-Pi font and another symbol/pi font. The error message is posted below.
I'm using fop 0.93 and I need help with embedding this font.

Is there anything to do with this?
/"currently present a problem because FOP cannot correctly determine the encoding of these two single-byte fonts through the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the PFMReader application writes "UnknownEncoding" to the generated XML file"

/If someone would try to work it out for me, i can send you the font to try out + .fo file.

This is my configuration for the font:
<font metrics-url="Bundesbahn.xml" kerning="yes" embed-url="Bundesba.pfb"> <font-triplet name="Bundesbahn" style="normal" weight="normal"/>
             </font>
/
*Error message generated by FOP:*
10/08/2007 06:16:13 org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.NullPointerException
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
       at org.apache.fop.cli.Main.startFOP(Main.java:160)
       at org.apache.fop.cli.Main.main(Main.java:191)

---------

java.lang.NullPointerException
at org.apache.fop.fonts.SingleByteFont.hasChar(SingleByteFont.java:103)
       at org.apache.fop.fonts.LazyFont.hasChar(LazyFont.java:166)
       at org.apache.fop.fonts.Font.hasChar(Font.java:189)
       at org.apache.fop.fonts.Font.getCharWidth(Font.java:231)
at org.apache.fop.layoutmgr.inline.TextLayoutManager.initialize(TextLayoutManager.java:188)
...........

Thank you,
/



---------------------------------------------------------------------
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