xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick" <r...@smallbizusa.com>
Subject RE: underlining text
Date Sat, 01 Jun 2002 12:41:19 GMT
Hi J.Pietschmann,

I was the one asking the other day about underlining whitespace. One of you
implied that it would be handled in version 0.20.37 which you gave me a link
to. Will there be a simple tag such as "whitespace= "100pt" or something
like that, or have the actual tags not been implemented yet.

When designing forms it would be nice to let people fill in the blanks. But
you must have an underlined blank space to fill in. Today I will be
experimenting with putting a bottom border into a "table cell" as a
temporary measure. ( not even sure if this will work) I am still a bit new
to FOP but I catch on quickly.

Thanks for the suggestion on the glyph idea. I will try that also.

PS, I am a big user of "forms" in Connecticut, for the legal industry. (also
a java programmer at heart from the very beginning) I have been looking for
a user friendly internet solution and I commend all of you at FOP for doing
such a great job. I am using your FopServlet for all my remote users. From
the looks of things my pilot program is being received quite well.

Keep up the good work.

PSS: where is the fop.jar file for version 0.20.37 ? or will it not be out
till the final release ?






-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Sent: Friday, May 31, 2002 5:24 PM
To: fop-user@xml.apache.org
Subject: Re: underlining text


Jeremias Maerki wrote:
> Try rendering your document using the PDF renderer and check if the
> white-space gets underlined. I would guess so.

Which is, unfortunately, wrong. In the following FO
   <fo:block>a <fo:inline text-decoration=
      "underline"> b c </fo:inline> d</fo:block>
The spaces just before b and after c are not underlined.
This is actually one of the not quite clear areas of the spec.
7.15.12 "white-space-collapse" says: "after refinement, where
some white space characters may have been discarded or turned
into space characters, all remaining runs of two or more
consecutive spaces are replaced by a single space, then any
remaining space immediately adjacent to a remaining linefeed
is also discarded."
It is not really obvious whether this collapsing extends
across FO borders. If it doesn't, inserting fo:inline could
be used to intentionally or unintentionally insert runs of
whitespace, which is counterintuitive. But then, there is a
lot of not really intuitive stuff elsewhere in the spec. FOP
collapses the spaces anyway.
The other problem is that the formal application of the
collapsing algorithm would discard the space before b but
keep the space after c in favor of the space before d, which
would result in an underlined space after c and a not
underlined space before b. Yuk! I tend to believe this
facilitated the decision not to underline leading and trailing
spaces in fo:inlines.
The space between b and c is always underlined.
There was a short but inconclusive discussion about this on
fop-dev some time ago, I believe Peter sent a question to the
XSL editors as a result.

Next problem: FOP does not underline the spaces before b and
after c even if white-space-collapse="false" is used and the
spaces are not collapsed.

I think I told the last one asking this to use the underline
character &#x5F; The glyph underline may be a bit off of the
text decoration underline, but it's better than nothing.
Another possibility is to find a non-space character with a
glyph which blends with the underlining and insert it before
and after the spaces, like
  <fo:inline text-decoration="underline">
   &#x00B8; b c &#x00B8;</fo:inline>
Unfortunately, the cedille &#x00B8; is still visible, but one
of the countless combining dots surely will do. &#x0323; looks
promising but requires MS Arial, and I'm just too lazy to install
it in order to check.

J.Pietschmann


Mime
View raw message