Print output layout is broken, when printing "writing-mode: vertical-rl" content to an actual printer (i.e. not the built-in Save-to-PDF print target)
Categories
(Core :: Printing: Output, defect)
Tracking
()
People
(Reporter: alice0775, Assigned: jfkthame)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(6 files)
200 bytes,
text/html
|
Details | |
402.17 KB,
application/pdf
|
Details | |
197 bytes,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr140+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
STR:
- Open attached testcase.html
- Print, e.g.
Microsoft Print to PDF
Actual results:
The print preview appears to be correct. However, the print result is completely corrupted.
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=d735e197d708d85d9b7e7cb1ea3609bdc4f27bd6&tochange=7387be4b195f3f266410d8faafbaf80f8176e293
![]() |
Reporter | |
Comment 1•4 months ago
|
||
Comment 2•4 months ago
|
||
:jfkthame, since you are the author of the regressor, bug 739096, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 3•4 months ago
•
|
||
I can reproduce, when printing the testcase to the "Microsoft Print to PDF" print target.
I can also reproduce when printing the testcase to an actual printer (Brother HL-2280DW).
But for whatever reason, I cannot reproduce when printing to our built-in Save-to-PDF print backend. So that's sort-of a workaround, I suppose. (i.e. you can avoid this bug by first printing to the Save-to-PDF backend, and then printing the resulting PDF (whether from Firefox or any PDF viewer) to the print target where you really want to print)
Comment 5•4 months ago
|
||
Here's a testcase from dupe bug 1962676. This testcase has "This is a test" written vertically (with "T" at the top), but Alice0775 White posted a printed result https://bugzilla.mozilla.org/attachment.cgi?id=9481160 which shows the letters placed in the reverse order, with "T" at the bottom.
Updated•3 months ago
|
Updated•2 months ago
|
Assignee | ||
Comment 6•2 months ago
|
||
This isn't unique to vertical writing modes; a similar problem can be reproduced with horizontal text where there are glyphs that require a vertical offset, such as stacked accent glyphs:
data:text/html;charset=utf-8,<div style="margin:1in;font:40px times new roman">foö́̈̂̈̃̈̀ba̠̣̰̱r
"Printing" this via the Microsoft Print to PDF driver, or to a physical printer on Windows, will render the stacked accents incorrectly.
I think I know where to fix this... testing a patch locally.
Assignee | ||
Comment 7•2 months ago
|
||
We used to have a sign-inversion like this in our cairo backend code:
This was previously fixed (by me!) back in bug 454098, but in the
process of updating cairo the change got lost as the code had moved
around and so our old patch file no longer applied.
(I'll see if I can get the standalone test program from that bug
working again, and file the issue upstream.)
Updated•2 months ago
|
Comment 9•2 months ago
|
||
bugherder |
Comment 10•2 months ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 11•2 months ago
|
||
This has been broken for quite a while, but given how trivial and low-risk the patch is, I think we should uplift it to esr140 so that Windows users on ESR get the fix rather than remaining in the broken state long-term.
Assignee | ||
Comment 12•2 months ago
|
||
We used to have a sign-inversion like this in our cairo backend code:
This was previously fixed (by me!) back in bug 454098, but in the
process of updating cairo the change got lost as the code had moved
around and so our old patch file no longer applied.
(I'll see if I can get the standalone test program from that bug
working again, and file the issue upstream.)
Original Revision: https://phabricator.services.mozilla.com/D254737
Updated•2 months ago
|
Comment 13•2 months ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined: Vertical Chinese/Japanese text (and some more complex horizontal scripts) prints incorrectly on Windows
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: On Windows, load testcases in the bug, and print (to an actual printer, or Microsoft Print to PDF -- NOT built-in Save To PDF destination)
- Risk associated with taking this patch: minimal
- Explanation of risk level: Restores a trivial fix in the cairo windows backend that we previously shipped for a number of years
- String changes made/needed: none
- Is Android affected?: no
Updated•2 months ago
|
Updated•2 months ago
|
Comment 14•2 months ago
|
||
uplift |
Assignee | ||
Comment 15•2 months ago
|
||
FTR, I've opened https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/629 to try and get this merged upstream.
Comment 16•2 months ago
|
||
The patch landed in nightly and beta is affected.
:jfkthame, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox141
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 17•2 months ago
|
||
We used to have a sign-inversion like this in our cairo backend code:
This was previously fixed (by me!) back in bug 454098, but in the
process of updating cairo the change got lost as the code had moved
around and so our old patch file no longer applied.
(I'll see if I can get the standalone test program from that bug
working again, and file the issue upstream.)
Original Revision: https://phabricator.services.mozilla.com/D254737
Updated•2 months ago
|
Assignee | ||
Comment 18•2 months ago
|
||
(See comment 13 for uplift request form.)
Updated•2 months ago
|
Updated•2 months ago
|
Comment 19•2 months ago
|
||
uplift |
Updated•2 months ago
|
Updated•2 months ago
|
Comment 20•2 months ago
|
||
Reproduced the initial issue using both Testcases from this bug on an old Nightly build before the fix (2025-04-25). Verified that using the latest Nightly 142.0a1 build, latest Beta 141.0b3 and ESR 140 build from treeherder both Microsoft Print to PDF
and Save to PDF
work as expected, as well as using a physical printer.
Description
•