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

NEW
Unassigned

Status

()

Core
Graphics
--
major
9 years ago
6 months ago

People

(Reporter: Chris Lawson (gone), Unassigned)

Tracking

({regression})

Trunk
x86
Mac OS X
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
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?

Comment 4

7 years ago
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

Comment 7

2 years ago
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.

Comment 8

6 months ago
Still unsolved in 52 esr.
You need to log in before you can comment on or make changes to this bug.