You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.nl> on 2004/04/02 21:19:36 UTC

Re: DO NOT REPLY [Bug 28130] - Errors in the calculation of adjustment factors

On Fri, Apr 02, 2004 at 09:58:43AM -0000, bugzilla@apache.org wrote:
> I went through a similar thought process to you when I analysed the code in 
> Text and Line LMs. I'm taking a closer look at your patch now.
> 
> 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.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl


Re: DO NOT REPLY [Bug 28130] - Errors in the calculation of adjustment factors

Posted by Chris Bowditch <bo...@hotmail.com>.
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



Re: DO NOT REPLY [Bug 28130] - Errors in the calculation of adjustment factors

Posted by Chris Bowditch <bo...@hotmail.com>.
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.

Chris