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:character>s, 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.
