You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by David Wood <ob...@panix.com> on 2002/02/25 23:34:00 UTC

Serious Problem - Inline Italics

I have a bunch of justified text. If I use

<fo:inline font-style="italic">...</fo:inline>

I get inconsistent and random-seeming gaps on either end of the inline
block. These are often large and ugly and are impossible to miss.

On every line where italics occur, the right margin is exceeded, as
though the spurious space being added around the italics are not being
taken into account during line breaking and justification calculations.

Not being able to use italics is a big huge one. Is there a workaround for
this? And if not, where should I look in the code to start fixing it?

-David


RE: markers

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Interesting...I didn't realise that that much was still functional. :-) I
will have to revisit and see what the scope of potential fixes is.

AHS

-----Original Message-----
From: Chuck Paussa [mailto:Chuck.Paussa@systems.dhl.com]
Sent: February 27, 2002 12:48 PM
To: fop-user@xml.apache.org
Subject: Re: markers


Hi Bart,

I've done some playing with markers also and gotten them to work pretty
well. One of the things I've noticed is that FOP complains mightily
about both "fo:marker must be an initial child"" and "marker-class-name'
must be unique for same parent."but, they are recoverable errors and can
be ignored.

Here's an XML and XSL to demonstrate the capabilities. Notice that I
place a marker at the beginning and end of each marked block (That's
strictly illegal! But it works) I also have placed an "x" in the illegal
marker contents so you can see the illegal retrieval. I do that so that
the functions first-including-carryover and last-ending-within-page will
work. Arved did a great job of implementing markers, you just have to
break the rules for now (and be prepared to unbreak the rules  when FOP
has a correct implementation)

fop -xsl dictionary.xsl -xml dictionary.xml -pdf dictionary.pdf

Chuck


Re: markers

Posted by Chuck Paussa <Ch...@systems.dhl.com>.
Hi Bart,

I've done some playing with markers also and gotten them to work pretty 
well. One of the things I've noticed is that FOP complains mightily 
about both "fo:marker must be an initial child"" and "marker-class-name' 
must be unique for same parent."but, they are recoverable errors and can 
be ignored.

Here's an XML and XSL to demonstrate the capabilities. Notice that I 
place a marker at the beginning and end of each marked block (That's 
strictly illegal! But it works) I also have placed an "x" in the illegal 
marker contents so you can see the illegal retrieval. I do that so that 
the functions first-including-carryover and last-ending-within-page will 
work. Arved did a great job of implementing markers, you just have to 
break the rules for now (and be prepared to unbreak the rules  when FOP 
has a correct implementation)

fop -xsl dictionary.xsl -xml dictionary.xml -pdf dictionary.pdf

Chuck

Bart Locanthi wrote:

> does fop support markers? i'm having trouble getting them to work.
>
> my input looks like
> ...
> <fo:flow>
>  <fo:block>
>    <fo:block>
>      <fo:marker marker-class-name="chap">chapter one</fo:marker>
>      ...
>    </fo:block>
>  </fo:block>
>  <fo:block>
>    <fo:block>
>      <fo:marker marker-class-name="chap">chapter two</fo:marker>
> ...
>
> note that the markers share a common great-grandparent.
>
> the error message i get from any fop-0.20.[23] is:
>
> [ERROR]: fo:marker must be an initial child,and 'marker-class-name' 
> must be unique for same parent.
>
> i'm following all the rules, i think, but no joy.
>
> sounds like a simple misconception on my part but i'm stumped.
>



Re: markers

Posted by Etwin van Krimpen <ev...@ambrac.nl>.
Arved,

I would appreciate that. One of the reasons to turn to (at this moment
evaluation-version of) XEP is that XEP works fine with marker-retrieve
marker.

Regards, Etwin

----- Original Message -----
From: "Arved Sandstrom" <Ar...@chebucto.ns.ca>
To: <fo...@xml.apache.org>
Sent: Wednesday, February 27, 2002 12:41 AM
Subject: RE: markers


> Hi, Bart
>
> I took markers up to a certain point last summer. I didn't have the
property
> re-parenting happening yet, but in terms of retrieving the right marker
> probably about half the retrieve-position/retrieve-boundary combos were
> already functional. The example file glossary.xml stems from that period.
>
> We had an injection of code just about that time that was generally held
to
> be higher priority, including by me, and this broke the partial marker
> support. I don't think anything has happened since, and so you are
probably
> seeing the effects of this, not doing anything wrong in your FO.
>
> I am loathe to invest any effort in marker support in the maintenance
> branch, unless Karen and/or Keiron were to indicate that they do not
expect
> functional markers in the rewrite for at least another 3 months (by which
I
> mean I'd be happy to actually write that code if they indicate that I
could
> reasonably expect to be doing so within 3 months). If it looks like there
> won't be any markers in the rewrite for quite a while then I'd be happy to
> look at getting them back into the maintenance branch because it wouldn't
be
> wasted effort.
>
> Regards,
> Arved Sandstrom
>
> -----Original Message-----
> From: Bart Locanthi [mailto:bart@sabl.com]
> Sent: February 26, 2002 7:26 PM
> To: fop-user@xml.apache.org
> Subject: markers
>
>
> does fop support markers? i'm having trouble getting them to work.
>
> my input looks like
> ...
> <fo:flow>
>   <fo:block>
>     <fo:block>
>       <fo:marker marker-class-name="chap">chapter one</fo:marker>
>       ...
>     </fo:block>
>   </fo:block>
>   <fo:block>
>     <fo:block>
>       <fo:marker marker-class-name="chap">chapter two</fo:marker>
> ...
>
> note that the markers share a common great-grandparent.
>
> the error message i get from any fop-0.20.[23] is:
>
> [ERROR]: fo:marker must be an initial child,and 'marker-class-name' must
> be unique for same parent.
>
> i'm following all the rules, i think, but no joy.
>
> sounds like a simple misconception on my part but i'm stumped.
>


RE: markers

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Hi, Bart

I took markers up to a certain point last summer. I didn't have the property
re-parenting happening yet, but in terms of retrieving the right marker
probably about half the retrieve-position/retrieve-boundary combos were
already functional. The example file glossary.xml stems from that period.

We had an injection of code just about that time that was generally held to
be higher priority, including by me, and this broke the partial marker
support. I don't think anything has happened since, and so you are probably
seeing the effects of this, not doing anything wrong in your FO.

I am loathe to invest any effort in marker support in the maintenance
branch, unless Karen and/or Keiron were to indicate that they do not expect
functional markers in the rewrite for at least another 3 months (by which I
mean I'd be happy to actually write that code if they indicate that I could
reasonably expect to be doing so within 3 months). If it looks like there
won't be any markers in the rewrite for quite a while then I'd be happy to
look at getting them back into the maintenance branch because it wouldn't be
wasted effort.

Regards,
Arved Sandstrom

-----Original Message-----
From: Bart Locanthi [mailto:bart@sabl.com]
Sent: February 26, 2002 7:26 PM
To: fop-user@xml.apache.org
Subject: markers


does fop support markers? i'm having trouble getting them to work.

my input looks like
...
<fo:flow>
  <fo:block>
    <fo:block>
      <fo:marker marker-class-name="chap">chapter one</fo:marker>
      ...
    </fo:block>
  </fo:block>
  <fo:block>
    <fo:block>
      <fo:marker marker-class-name="chap">chapter two</fo:marker>
...

note that the markers share a common great-grandparent.

the error message i get from any fop-0.20.[23] is:

[ERROR]: fo:marker must be an initial child,and 'marker-class-name' must
be unique for same parent.

i'm following all the rules, i think, but no joy.

sounds like a simple misconception on my part but i'm stumped.


markers

Posted by Bart Locanthi <ba...@sabl.com>.
does fop support markers? i'm having trouble getting them to work.

my input looks like
...
<fo:flow>
  <fo:block>
    <fo:block>
      <fo:marker marker-class-name="chap">chapter one</fo:marker>
      ...
    </fo:block>
  </fo:block>
  <fo:block>
    <fo:block>
      <fo:marker marker-class-name="chap">chapter two</fo:marker>
...

note that the markers share a common great-grandparent.

the error message i get from any fop-0.20.[23] is:

[ERROR]: fo:marker must be an initial child,and 'marker-class-name' must 
be unique for same parent.

i'm following all the rules, i think, but no joy.

sounds like a simple misconception on my part but i'm stumped.


Re: Serious Problem - Inline Italics

Posted by David Wood <ob...@panix.com>.
I just figured it out. I found cases where the problem didn't occur, and
then worked backwards. It was because I was using a fractional point size
for my fonts.

When I first tried a fractional size (10.5pt) I had observed that the text
was coming out smaller and deduced the point size was being rounded down
to the nearest integer. I figured that was the end of it and left the font
sizes specified that way. Eventually, the fix would catch up with the
template, right?

However, the other *side effect* of having a real number point size for a
font is the massive problems with inline blocks and font styles that I
observed. That, and a margin jump.

Once I put the font size back to an integer, everything became "normal" -
though I still notice a very slight, almost imperceptible variation along
the right margin of justified text, the output is fine.

I have the beginnings of a picture in my head about what was going on
inside the renderer, but I won't bore the crowd with speculation. At any
rate, problem "solved."  :)

Thanks for your responses Jeremias.

-David

On Tue, 26 Feb 2002, David Wood wrote:

> I'm actually using the PDF renderer. I've got the source and am hunting
> around now. If I have anything to say about it, this bug isn't going to
> last until Friday.
>
> Of course, anyone with knowledge of PDFRenderer who would like to comment
> on this bug is more than welcome... No answer to my post on the dev list,
> though.
>
> Also, if anyone is using the PDFRenderer with inline italic/bold text and
> is _not_ having this problem, I'd really like to hear from them too.
>
> -David
>
> On Tue, 26 Feb 2002, Jeremias Maerki wrote:
>
> > Are you using the PostScript Renderer? If yes, then I can only tell you,
> > it's on the tasklist. If you want to look into it yourself, look at
> > org.apache.fop.render.ps.PSRenderer.java.
> >
> > > I have a bunch of justified text. If I use
> > >
> > > <fo:inline font-style="italic">...</fo:inline>
> > >
> > > I get inconsistent and random-seeming gaps on either end of the inline
> > > block. These are often large and ugly and are impossible to miss.
> > >
> > > On every line where italics occur, the right margin is exceeded, as
> > > though the spurious space being added around the italics are not being
> > > taken into account during line breaking and justification calculations.
> > >
> > > Not being able to use italics is a big huge one. Is there a workaround for
> > > this? And if not, where should I look in the code to start fixing it?
> >
> > Cheers,
> > Jeremias M�rki
> >
> > mailto:jeremias.maerki@outline.ch
> >
> > OUTLINE AG
> > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> > Fon +41 41 317 20 20 - Fax +41 41 317 20 29
> > Internet http://www.outline.ch
> >
>
>
>



Re: Serious Problem - Inline Italics

Posted by David Wood <ob...@panix.com>.
I'm actually using the PDF renderer. I've got the source and am hunting
around now. If I have anything to say about it, this bug isn't going to
last until Friday.

Of course, anyone with knowledge of PDFRenderer who would like to comment
on this bug is more than welcome... No answer to my post on the dev list,
though.

Also, if anyone is using the PDFRenderer with inline italic/bold text and
is _not_ having this problem, I'd really like to hear from them too.

-David

On Tue, 26 Feb 2002, Jeremias Maerki wrote:

> Are you using the PostScript Renderer? If yes, then I can only tell you,
> it's on the tasklist. If you want to look into it yourself, look at
> org.apache.fop.render.ps.PSRenderer.java.
>
> > I have a bunch of justified text. If I use
> >
> > <fo:inline font-style="italic">...</fo:inline>
> >
> > I get inconsistent and random-seeming gaps on either end of the inline
> > block. These are often large and ugly and are impossible to miss.
> >
> > On every line where italics occur, the right margin is exceeded, as
> > though the spurious space being added around the italics are not being
> > taken into account during line breaking and justification calculations.
> >
> > Not being able to use italics is a big huge one. Is there a workaround for
> > this? And if not, where should I look in the code to start fixing it?
>
> Cheers,
> Jeremias M�rki
>
> mailto:jeremias.maerki@outline.ch
>
> OUTLINE AG
> Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> Fon +41 41 317 20 20 - Fax +41 41 317 20 29
> Internet http://www.outline.ch
>



Re: Serious Problem - Inline Italics

Posted by Jeremias Maerki <je...@outline.ch>.
Are you using the PostScript Renderer? If yes, then I can only tell you,
it's on the tasklist. If you want to look into it yourself, look at
org.apache.fop.render.ps.PSRenderer.java.

> I have a bunch of justified text. If I use
> 
> <fo:inline font-style="italic">...</fo:inline>
> 
> I get inconsistent and random-seeming gaps on either end of the inline
> block. These are often large and ugly and are impossible to miss.
> 
> On every line where italics occur, the right margin is exceeded, as
> though the spurious space being added around the italics are not being
> taken into account during line breaking and justification calculations.
> 
> Not being able to use italics is a big huge one. Is there a workaround for
> this? And if not, where should I look in the code to start fixing it?

Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch