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 bu...@apache.org on 2011/10/31 16:21:39 UTC

DO NOT REPLY [Bug 52114] New: Extra spacing between characters while rendering text output

https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

             Bug #: 52114
           Summary: Extra spacing between characters while rendering text
                    output
           Product: Fop
           Version: all
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: shawn.peters@cerner.com
    Classification: Unclassified


Created attachment 27877
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27877
Example FO to recreate the problem

Some font sizes, such as 10 pt, seem to produce good output. However, when
other font sizes are used, spacing on <inlines> becomes unpredictable.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #12 from Shawn <sh...@cerner.com> 2012-04-12 14:15:19 UTC ---
Created attachment 28595
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28595
Updated FO based based on recoomendations

My FO is using a fixed width font (Courier). I updated it based on the
recommendations on the page provided. I changed the font size and the line
height and it made it even worse.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #8 from Glenn Adams <gl...@skynav.com> 2012-04-02 14:06:35 UTC ---
(In reply to comment #7)
> Could you provide additional questions? I thought I provided what was requested
> before.

you have not provided a PDF output file produced by the version of FOP you are
testing/using with the sample input file you did provide

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |INVALID

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #17 from Shawn <sh...@cerner.com> 2012-04-12 19:20:52 UTC ---
Hey Glenn, it looks like you found a way to fix it? I don't suppose you could
provide any more details about what you think was causing it could you?

Also, will there be any issues if I don't specify a line height? The way our
cod works today we typically are not specifying a line height. When looking at
the result the text looks fine, but the space allocated for the height is
certainly larger than what we need, but i don't necessarily see anything wrong
with it.

If it is fixed, do you have an anticipated release date? Or a version I could
try out?

Thanks a lot, I really appreciate it!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #18 from Glenn Adams <ga...@apache.org> 2012-04-12 20:49:35 UTC ---
(In reply to comment #17)
> Hey Glenn, it looks like you found a way to fix it? I don't suppose you could
> provide any more details about what you think was causing it could you?

see the link i put in the prior comment, repeated here [1]:

[1] http://svn.apache.org/viewvc?view=revision&revision=1325394

> Also, will there be any issues if I don't specify a line height? The way our
> cod works today we typically are not specifying a line height.

yes, as i indicate, the default line height is 1.2*font-size, so that will
produce incorrect row computation, resulting in unexpected blank lines on TXT
rendering; note that since line-height is inheritable, you only need to specify
it once, e.g., on fo:flow or on fo:page-sequence or fo:root, to have it
inherited by descendant fo:blocks

> When looking at
> the result the text looks fine, but the space allocated for the height is
> certainly larger than what we need, but i don't necessarily see anything wrong
> with it.
> 
> If it is fixed, do you have an anticipated release date? Or a version I could
> try out?

the fix will be incorporated into the nightly builds [2] and the upcoming
FOP1.1 release (no date set)

[2] http://ci.apache.org/projects/xmlgraphics/fop/snapshots/

> Thanks a lot, I really appreciate it!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #1 from Pascal Sancho <pa...@takoma.fr> 2011-11-03 09:15:37 UTC ---
(In reply to comment #0)

> Some font sizes, such as 10 pt, seem to produce good output. However, when
> other font sizes are used, spacing on <inlines> becomes unpredictable.

Can you give a more accurate description of what you get, I see nothing wrong
on what I get (against either FOP 1.0 or FOR trunk).

 - what FOP version do you use?
 - diff between expected et get result?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #7 from Shawn <sh...@cerner.com> 2012-04-02 13:32:22 UTC ---
Could you provide additional questions? I thought I provided what was requested
before.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #15 from Shawn <sh...@cerner.com> 2012-04-12 17:31:56 UTC ---
That definitely seemed to work. Thanks!

I do need to know if this could potentially break existing text we might be
sending through this renderer that come out looking just fine. If we made this
change this would effectively be used for all plain text renderer we need to
do. we could get any combination of text. Basically we hard code the font size,
but allow the client to override it.

We hard code it to 10.5 with no line height specified. Im trying to figure out
if your recommendation should be our new default or if we should just instruct
the client to override our default.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #6 from Glenn Adams <gl...@skynav.com> 2012-04-01 15:47:23 UTC ---
resolved invalid due to lack of information (PDF output file)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #3 from Shawn <sh...@cerner.com> 2011-11-03 13:58:51 UTC ---
we are currently using version 0.95beta-1. We did test against the 1.0 version
as well and it was still an issue for us.

Basically the word with the apostrophes gets a bunch of extra spaces put in
between them when producing text output

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #10 from Shawn <sh...@cerner.com> 2012-04-10 18:32:45 UTC ---
Created attachment 28571
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28571
Example TXT file that FOP produces

Sorry for the delayed response. Here is an example TXT file FOP produced from
the example FO file already attached. The issue is not producing PDF its
producing plain text output. PDF is just fine. I apologize for the confusion.
Is there anything else I can provide?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #5 from Shawn <sh...@cerner.com> 2011-12-30 22:47:55 UTC ---
Sorry for the long delay, but I attached the original FO and i dont see any
that in it.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #4 from Pascal Sancho <pa...@takoma.fr> 2011-11-03 15:06:22 UTC ---
One cause should be line breaks between inline elements in original FO.

If this is the case, then the behavior is normal: line breaks are considered as
blank spaces in XML content (unless explicitly specified LF treatment).

Can you check that point?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #13 from Shawn <sh...@cerner.com> 2012-04-12 14:15:49 UTC ---
Created attachment 28596
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28596
Output based on updated FO - Event worse

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #14 from Glenn Adams <ga...@apache.org> 2012-04-12 16:27:51 UTC ---
(In reply to comment #13)
> Created attachment 28596 [details]
> Output based on updated FO - Event worse

(In reply to comment #11)
> only fixed font usage is supported for the TXT renderer; see
> 
> http://xmlgraphics.apache.org/fop/1.0/output.html#txt

it appears the data in that page is out of date; please try font-size="10pt";
also, you may need to play with line-height; i reduced the page width to force
line breaks, then experimented with line height to produce reasonable results;
oddly, i found that line-height='6pt' seemed to work best when font-size was
10pt

in any case, the caveat emptor found in the description of the TXT rendereer
"The renderer is very limited, so do not be surprised if it gives
unsatisfactory results." should be kept in mind

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

Shawn <sh...@cerner.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shawn.peters@cerner.com
         OS/Version|                            |All

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

Pascal Sancho <pa...@takoma.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Pascal Sancho <pa...@takoma.fr> 2011-11-03 09:16:08 UTC ---
forgot to change status

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

Glenn Adams <ga...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |FIXED

--- Comment #16 from Glenn Adams <ga...@apache.org> 2012-04-12 17:44:34 UTC ---
http://svn.apache.org/viewvc?view=revision&revision=1325394

fixed bug in TXT renderer's handling of row height computation due to it not
taking into account space before/after produced by leading (before and after)

at this time, use of the following appears to produce desired results:

font-family = "Courier"
font-size = "10pt"
line-height = "10pt"

note that the default line height if not specified will be 1.2*font-size =
12pt, which will not produce the correct results

also updated site documentation (which i will publish to apache shortly)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

--- Comment #9 from Pascal Sancho <pa...@takoma.fr> 2012-04-02 14:37:44 UTC ---
(In reply to comment #5)
> Sorry for the long delay, but I attached the original FO and i dont see any
> that in it.

I see nothing wrong in PDF output, against FOP v0.95, v1.0, or trunk.
So I persist that there are some extra spaces in your original XSL-FO that are
not in your test case.

As Glenn said, there is no output file or description, showing/explaining what
is wrong.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52114] Extra spacing between characters while rendering text output

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52114

Glenn Adams <ga...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |WONTFIX

--- Comment #11 from Glenn Adams <ga...@apache.org> 2012-04-10 23:42:47 UTC ---
only fixed font usage is supported for the TXT renderer; see

http://xmlgraphics.apache.org/fop/1.0/output.html#txt

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.