I've tracked down the reason for the problem I reported below.

Unfortunately, I've done this in the pre-codeformat sources and I don't have
access to a patch generator (well maybe but it's a minor fix).

In org.apache.fop.layout.LineArea towards the end of the function:
    private int getWordWidth(String word, boolean doMap)
the line (992 in old code) was changed to be:
        width += getCharWidth(currentChar);

This caused some characters to be mapped twice.

The fix I'm suggesting is to split the function:
    private int getCharWidth(char c)
which begins
        int width = currentFontState.width(currentFontState.mapChar(c));
        if (width <= 0) {
...

into two functions as follows:

    private int getCharWidth(char c) {
        return getMappedCharWidth(currentFontState.mapChar(c));
    }

    private int getMappedCharWidth(char c) {
        int width = currentFontState.width(c);
        if (width <= 0) {
...

and then changed the above mentioned line in getWordWidth() to be:
        width += getMappedCharWidth(currentChar);


I hope this can be checked and committed soon.

TTFN
----
Struan Judd <*> "And so it begins ..."  ICQ: 4498196
http://neongraal.sf.org.nz
mailto:[EMAIL PROTECTED]                 Voicemail and Fax: +1 (201) 305-1011 x1006


> -----Original Message-----
> From: Struan Judd [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 27 July 2001 12:53
> To: [EMAIL PROTECTED]
> Subject: The current CVS version seems to be seriously broken
>
>
> It builds fine but the finally laid out PDF has overlapping areas and
> non-lined up leading edges of table columns.
>
> I am using an embedded font but that's all I can think of that different
> from defaults.
>
> If I checkout as at 25th of July it works fine.
>
> So what's been checked in recently that might affect that.
>
> TTFN
> ----
> Struan Judd <*> "And so it begins ..."        ICQ: 4498196
> http://neongraal.sf.org.nz
> mailto:[EMAIL PROTECTED]                       Voicemail and Fax:
> +1 (201) 305-1011 x1006
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to