Chris Bowditch wrote:

Simon Pepping wrote:

I believe the reason why justification still doesnt work after correcting the issues you've found is because TextLM.addAreas doesnt create separate areas for each word - it creates one big area in some cases for whole line, so there is no opportunity to add space adjust for justification.



The layout managers only do the calculations. The renderers need to do the real work, i.e. apply the calculation to the line to be rendered. The LM can help by splitting up the line in a number of text areas, or the renderer can scan the unsplit text areas and apply stretching to the white space in it. There was a discussion about this topic on this list some time ago.


Yes, I was the one who started the previous discussion. Joerg was pushing for the Renderers to do the splitting too. But I disagree with this approach because the LMs have already worked out the BPs, why make the Renderers do it again. This is very inefficient approach dont you think?

I believe changing the TextLM.addAreas to generate an area for each BP if justification is on is the most efficient way of implementing justification.


Just want to add that I realise changing TextLM.addAreas isnt the only other change required to get jusitification working. The Renderers will need changing too, but I'm against the renderers computing their own splits, just give them each word as its own area if justification is on.


Chris




Reply via email to