FIX: XML Renderer doesn't generate 100% valid XML

2001-08-14 Thread Struan Judd

Specifically if you have any of ampersand, greater-than or less-than symbols
in text they will not be escaped as per the XML spec.

Correcting diff to org.apache.fop.render.xml.XMLRenderer between the ''s


321a322,331
 else if (ch == '')
 sb = sb.append(amp;);
 else if (ch == '')
 sb = sb.append(lt;);
 else if (ch == '')
 sb = sb.append(gt;);
 else if (ch == '\'')
 sb = sb.append(apos;);
 else if (ch == '')
 sb = sb.append(quot;);


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]




Fix (not Patch) to changes on 26 July that broke Embedded Font layout

2001-07-31 Thread Struan Judd

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]




The current CVS version seems to be seriously broken

2001-07-26 Thread Struan Judd

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]




RE: Keep-together (and the other keep-*'s)

2001-07-17 Thread Struan Judd

 Subject: Re: Keep-together (and the other keep-*'s)
 It's not against spec in my book either, but it's currently not
 implemented in FOP, for table-row or for anything else.
 The problem with all that keep-* stuff is that it's not that easy to do.
 Actually, I was kind of mulling it over for table-rows, but so far, I
 haven't gotten around to it.

 Karen

And on a carefuly re-reading of the Spec I see what caused my confusion. In
6.7.9 the keep-together attribute is noted as applying to fo:table-row,
whereas in 7.18.3 (where I was looking when I wrote my inital email),
fo:table-row is missing from the list of objects the keep-together attribute
applies to.

Ooops.

And as to difficult to do.

I bet. But very useful.

I might just have to make some home programming time and dive in.

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]




Keep-together (and the other keep-*'s)

2001-07-16 Thread Struan Judd

Is some wonderous FOP developer working on implementing this portion of the
XSL:FO spec? Any hope of an initial commit soon?

Unfortunately my personal timetable precludes me diving in and having a go.
:-(

If so might I request a small departure from the XSL:FO spec, if it is
straight-forward to implement. Please allow keep-together on fo:table-row.

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]




RE: vertically centering contents of table-cell

2001-07-16 Thread Struan Judd

Eric,

I had this requirement (well more correctly, I needed display-align='after')
and the first thing I tried was to comment out the first line of real code
in setRowHeight(int), ie. cellArea.increaseHeight(h + borderHeight/2 -
cellArea.getHeight());

Now this makes display-align work (sorta) but mucks up the border and
background for any table cells where display-align is not the default
(before?)

For the moment this is acceptable to me but probably not to the project as a
whole.

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: Eric Galluzzo [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 17 July 2001 01:29
 To: [EMAIL PROTECTED]
 Subject: RE: vertically centering contents of table-cell


  Good question. Does anyone knows how to vertically center text in a
  table-cell?

 I'm afraid that I don't. :)

 I tried display-align=center and vertical-align=middle, both to no
 avail.  From the code (specifically,
 org.apache.fop.fo.flow.TableCell.setup() and setRowHeight(int) ) it looks
 like display-align should be supported, but it seems that
 setRowHeight() is
 not being called.  At least, I set a breakpoint in that method
 and it never
 halted execution.  Being a FOP newbie, I'm not sure how to fix
 this problem.

 Any ideas?

 - Eric


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




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