Hi, Adrian Cumiskey wrote: > Hi Jonathan, > > I took a stab at applying a patch by Richard Wheeldon some time ago now > but the solution was not complete (see > https://issues.apache.org/bugzilla/show_bug.cgi?id=42307). > > Without spending too much time looking into this, I am of the impression > that there is not a singular place where you could implement this in the > current architecture as each painter and renderer provides its own > implementation for text handling.
And this is only half of the story. Changes also need to be made to the layout engine: character re-ordering, BIDI implementation, glyph shaping, etc. You will need to familiarize yourself with the Knuth approach. Some information is available on the wiki: http://wiki.apache.org/xmlgraphics-fop/DeveloperPages But you will most probably also have to read Donald Knuth’s article “Breaking Paragraphs into Lines”. The corresponding code is in the org.apache.fop.layout package. Using the ICU4J library will probably be necessary. Search the fop-dev archive for ICU4J and you will already find some information on the topic. Also, I recently stumbled upon the following article: http://behdad.org/text/ which might be worth reading. The whole idea being that we should avoid re-inventing the wheel as much as possible. > From what I can see, it would currently involve changes to :- > > 1. renderText(TextArea text, Graphics2D g2d, Font font) method in > Java2DRenderer. > > 2. The renderText() methods in all the Renderer implementations. > > 3. The drawText() method in each Painter implementation. > > The situation appears to be far from ideal. I'm sorry but I do not have > any time to help you with this due to other off-project development > commitments that I have at the moment. Hope this information is of help > to you. > > Best of luck, > > Adrian Cumiskey. > > Jonathan Levinson wrote: >> Is there a way the software team at InterSystems could work with you >> (the FOP team) to add support for Arabic to FOP? >> >> We do have in-house expertise on Arabic. >> >> We are not expert in FOP internals and would need help knowing what >> areas of the code need to be worked on. >> >> I’ve been trying to send you an e-mail about the issues involved but >> it is being rejected as spam. Try sending your messages as plain text instead of HTML. That should reduce the spam rating. Plain text messages on public mailing lists are preferred anyway. >> Best Regards, >> >> Jonathan Levinson HTH, Vincent
