Hi John, line-height.conditionality is indeed what you are looking for, and it’s not implemented yet in FOP.
ATM only the .optimum component of line-height is passed to LineLayoutManager. This would have to be changed to pass all of the components. Then something would have to happen in LineBreakingAlgorithm.makeLineBreakPosition, where there might be a little difficulty due to the fact that half-leading must not be taken into account when line-stacking-strategy="line-height" (although I believe that value is not supported yet). Then in LineLayoutManager.postProcessLineBreaks, additional elements corresponding to space-before and space-after would have to be added to the returned list (but you seem to have figured that out already). I would take inspiration from BlockStackingLM.addKnuthElementForSpaceBefore. It should be possible to generate a SpaceProperty computed from the half-leading. If you’re lucky that would be enough to get the conditionality working. HTH, Vincent On 26/03/13 09:11, jsolutions wrote: > Thanks Chris, > > That is not really the scenario I'm dealing with. I specifically want there > to be no half leading above the first line in a reference area. At the > bottom of a reference area, I want the line breaking to allow a line to fit > on the page when it's line-height is too big for the page, but if you remove > the bottom half leading then it can fit. > > Here is an example of it not working with the input data given, the black > border is on the body region and the red border on the block I want > line-height.conditionality to apply to: > > output.pdf <http://apache-fop.1065347.n5.nabble.com/file/n38226/output.pdf> > > I thought this was the main purpose of the line-height.conditionality > property? > > Anyway, I have made some modifications to the fop source and split the line > area into a box/glue/penalty rather than a single box, when determining page > breaks. > > I may submit it if I thought there was enough interest, but the lack of > response and also the fact that RenderX and Antenna House also don't appear > to support it. The fact that they didn't appear to made me think I was doing > something wrong. > > Cheers > > JC > > > > ----- > John Cumming - jSolutions Ltd > http://www.jsolutions.co.uk > -- > View this message in context: > http://apache-fop.1065347.n5.nabble.com/line-height-conditionality-tp38191p38226.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org