Closed Bug 488159 Opened 15 years ago Closed 3 years ago

Printing page as PDF results in duplicate styled characters (bold text is doubled)

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bugzilla-graveyard, Unassigned)

References

()

Details

(Keywords: regression)

STR:

1) Print http://macscripter.net/viewtopic.php?id=28947 as a PDF file from either Camino trunk or Firefox 3. (Probably happens in any Gecko 1.9.x-based browser.)
2) Open PDF in Preview.
3) Select and copy the block of AppleScript code (from just after "Open this Scriplet in your Editor:" to "end adding folder items to", inclusive).
4) Paste into a text editor.

ER: Text editor contains script exactly as displayed.

AR: Text editor contains duplicated characters for all bold words, so "on" becomes "oonn", "tell" becomes "tteellll", etc.

Not sure when this broke, but I'm pretty sure it is indeed a regression. I'll try to hunt down a window later.
Safari 3.2.1 exhibits a similar problem, wherein whole words are duplicated with some kind of whitespace character between them, so "on" becomes:

"on
on"

(I didn't investigate specifically what character is represented by \r, so it might be \n or some other CR/LF-like character), "tell" becomes:

"tell
tell"

etc.
Pretty sure this is due to synthetic bold being used for that, which is indeed a doubling of characters (offset by a tiny bit).  Safari probably does the same thing in a different way.  Not sure what the right fix is, since we want the synthetic bold when going to a real printer.
John, presumably nothing changed here, do we have a plan for this? Or are we going to wontfix this?
We still need a fix for this.  To start with we should figure out what WebKit is doing since they do the same double-striking we do.
Rather than double-striking, it's possible to do "synthetic bold" in PDF by changing the text-drawing mode (I forget the exact PDF commands offhand); the idea is to both fill and stroke the glyphs in order to "fatten" them a bit, depending on the stroke thickness. We'd get better results if we could detect when we're drawing to a PDF destination and change our fake-bold implementation accordingly.
Pasting to TextEditor lost format (bold) but there was not duplicating
Pasting to Notes retained formatting and there was no duplicating
Version 	47.0.1
Build ID 	20160623154057
User Agent 	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0
"ni" me if additional confirmations are needed, or if this can close
Version 	48.0.2
Build ID 20160817112116
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0
test print:https://support.mozilla.org/zh-CN/kb/Firefox%20prints%20incorrectly#firefox:mac:fx48
or save as PDF in command+P,bold text is doubled.
Still unsolved in 52 esr.

Marking this as Resolved > Worksforme since the issue no longer is reproducible on the latest versions of Firefox Nightly 95.0a1 (2021-11-1), beta 94.0 or release 93.0 on MacOS 11.6.
If anyone can still reproduce the issue either re-open it or file a new one.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.