Re: DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-05-25 Thread Jeremias Maerki
I'd be interested to know what these errors were. Maybe we can somehow
improve the testing process. Maybe we could even download the necessary
libraries (JUnit, XMLUnit, hyphenation patterns) through Apache Ivy

On 24.05.2007 00:32:58 bugzilla wrote:
 http://issues.apache.org/bugzilla/show_bug.cgi?id=42109
 --- Additional Comments From [EMAIL PROTECTED]  2007-05-23 15:32 ---
  Paul, please make it a habit of running the test suite (done automatically
  when building from the command-line using Ant) when you want to submit
  something.
 
 OK. I set it up a while ago but ran into a lot of errors and didn't have time 
 to
 fully investigate what went wrong. So I went back to build package. But I'll
 try again next time, and be a little more perseverant.


Jeremias Maerki



DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-05-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-05-23 15:32 ---
 Paul, please make it a habit of running the test suite (done automatically
 when building from the command-line using Ant) when you want to submit
 something.

OK. I set it up a while ago but ran into a lot of errors and didn't have time to
fully investigate what went wrong. So I went back to build package. But I'll
try again next time, and be a little more perseverant.

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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-05-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-05-21 00:37 ---
Thanks a lot for that patch, Paul. I've applied it:
http://svn.apache.org/viewvc?view=revrev=540049

Paul, please make it a habit of running the test suite (done automatically when
building from the command-line using Ant) when you want to submit something. One
of the test cases needed to be adjusted to account for the missing ZWSPs in the
area tree. Thanks.

BTW, the only case where the ZWSP probably shouldn't be removed is when at some
point we will support tagged PDF. But at the moment, this is probably the most
elegant solution.

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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-04-14 09:28 ---
I dug a little deeper (though not to the bottom) and found out that the problem
arises when PDFRenderer.escapeText() generates the string to be inserted in the
content stream. Zero-width spaces get converted to normal spaces here, and an
adjustment is added which is equal to charwidth(space) - charwidth(zwsp). With
Times for instance, this is inserted: ( ) 250  (without the quotes). With
Helvetica it's ( ) 278 . In either case, the appearance of the PDF is correct.

The character widths are queried from the parent area's Font object. If they are
correct (as is the case with non-embedded Base-14 fonts), there's no visible
(back)space in the PDF. (However, if you copy-and-paste the text, it contains
spaces where the ZWSPs were.)

But if the font is embedded in the PDF, the width of the regular space character
seems to be reported wrongly by the font and - for Times - this is inserted:
0003 777  (0003 being the correct code for space). The adjustment is way
too large, hence the backspace effect.

Anyway, even if rendered correctly, ZWSPs are useless once they've done their
job as break-opportunity indicators. They add dead weight to the PDF and mess up
copy-and-paste. As I assume that other renderers have no need for them either, I
think it would be best if they weren't added to the area tree at all. So I'll
upload another patch that can be used instead of the previous one (or alongside
it; they're not in each other's way).

Side note: while working on this, I also discovered that if ZWSPs are inserted
through fo:characters, they are not used for line breaking.


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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-04-14 09:32 ---
Created an attachment (id=19961)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19961action=view)
Patch to keep zero-width spaces out of the area tree


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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-04-13 01:32 ---
Thanks for spotting this and submitting a patch. Good work.

Bug Confirmed. I tested your FO with Arial in PDF and the same affect occured.

I was a little concerned that your fix was PDF specific, so I tried to 
recreate the issue in Postscript but the bug doesn't seem to affect the 
Postscript Renderer.

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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-04-12 16:31 ---
Created an attachment (id=19940)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19940action=view)
Example FO


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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-04-12 16:33 ---
Created an attachment (id=19941)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19941action=view)
PDF built from example FO


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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #19941|application/unknown |application/pdf
  mime type||




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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109





--- Additional Comments From [EMAIL PROTECTED]  2007-04-12 16:38 ---
Created an attachment (id=19942)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19942action=view)
Patch for org\apache\fop\render\pdf\PDFRenderer.java


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


DO NOT REPLY [Bug 42109] - [PATCH] ZWSP works as backspace when font is embedded

2007-04-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=42109.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42109


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #19942|0   |1
is obsolete||




--- Additional Comments From [EMAIL PROTECTED]  2007-04-12 16:43 ---
Created an attachment (id=19943)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=19943action=view)
Patch for org\apache\fop\render\pdf\PDFRenderer.java

Sorry, seem to have added the entire Java file instead of just the patch! Hope
I get it right this time.

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