[Moving to fop-dev as we're going to speak about implementation details] Andrejus Chaliapinas a écrit : > Hi Jeremias, > >> I've just checked since I was curious. It's already in 0.90. Seems to >> have to do with font metrics. Take a look at the Area Tree XML. The >> label has a BPD of 18936 while the body has 14400. Symbol has an >> ascender of 1010 while Helvetica has 718. >> >> Smells like a need for implementing relative-align="baseline" to me. >> >> Jeremias Maerki > > Would it be hard to fix? Should I try that myself (hmm, not so easy) or > someone else could take a look on that?
In theory no; in practice... I'm not familiar with the inline part of the layout code, but as I've been having this idea in the head for some time, I thought I might use this opportunity to explain it. Inline specialists, please correct me if I'm wrong. AFAIK there is no information about the distance of the baseline from the before-edge of an area. A quick small picture: ------------------------ <-- before-edge of the area | | | First line of text. | <-- "base-line" of the area | Second line of text. | (= baseline of the first line) | | | | | | ------------------------ If we had that information for each area, then this would be easy to implement relative-align I think. That would imply to change almost every LayoutManager to compute/transfer this information. Quite a bit of work. Andrejus, if you want to give it a try, you're welcome ;-) We would be glad to help you find your way in the code. But, granted, that's perhaps not the easiest way to get involved into FOP's development. What do others think? Vincent